@@ -517,6 +517,7 @@ cmd_ac_init(void)
|
||||
autocomplete_add(bookmark_ac, "update");
|
||||
autocomplete_add(bookmark_ac, "remove");
|
||||
autocomplete_add(bookmark_ac, "join");
|
||||
autocomplete_add(bookmark_ac, "invites");
|
||||
|
||||
bookmark_property_ac = autocomplete_new();
|
||||
autocomplete_add(bookmark_property_ac, "nick");
|
||||
@@ -1599,6 +1600,10 @@ _bookmark_autocomplete(ProfWin *window, const char *const input)
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
found = autocomplete_param_with_func(input, "/bookmark invites", prefs_autocomplete_boolean_choice);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
|
||||
found = autocomplete_param_with_ac(input, "/bookmark", bookmark_ac, TRUE);
|
||||
return found;
|
||||
|
||||
@@ -807,7 +807,8 @@ static struct cmd_t command_defs[] =
|
||||
"/bookmark add <room> [nick <nick>] [password <password>] [autojoin on|off]",
|
||||
"/bookmark update <room> [nick <nick>] [password <password>] [autojoin on|off]",
|
||||
"/bookmark remove <room>",
|
||||
"/bookmark join <room>")
|
||||
"/bookmark join <room>",
|
||||
"/bookmark invites on|off")
|
||||
CMD_DESC(
|
||||
"Manage bookmarks and join bookmarked rooms. "
|
||||
"In a chat room, no arguments will bookmark the current room, setting autojoin to \"on\".")
|
||||
@@ -819,7 +820,8 @@ static struct cmd_t command_defs[] =
|
||||
{ "nick <nick>", "Nickname used in the chat room." },
|
||||
{ "password <password>", "Password if required, may be stored in plaintext on your server." },
|
||||
{ "autojoin on|off", "Whether to join the room automatically on login." },
|
||||
{ "join <room>", "Join room using the properties associated with the bookmark." })
|
||||
{ "join <room>", "Join room using the properties associated with the bookmark." },
|
||||
{ "invites on|off", "Whether or not to bookmark accepted room invites, defaults to 'on'."})
|
||||
CMD_NOEXAMPLES
|
||||
},
|
||||
|
||||
|
||||
@@ -4337,7 +4337,19 @@ cmd_bookmark(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (strcmp(cmd, "list") == 0) {
|
||||
if (strcmp(cmd, "invites") == 0) {
|
||||
if (g_strcmp0(args[1], "on") == 0) {
|
||||
prefs_set_boolean(PREF_BOOKMARK_INVITE, TRUE);
|
||||
cons_show("Auto bookmarking accepted invites enabled.");
|
||||
} else if (g_strcmp0(args[1], "off") == 0) {
|
||||
prefs_set_boolean(PREF_BOOKMARK_INVITE, FALSE);
|
||||
cons_show("Auto bookmarking accepted invites disabled.");
|
||||
} else {
|
||||
cons_bad_cmd_usage(command);
|
||||
cons_show("");
|
||||
}
|
||||
return TRUE;
|
||||
} else if (strcmp(cmd, "list") == 0) {
|
||||
const GList *bookmarks = bookmark_get_list();
|
||||
cons_show_bookmarks(bookmarks);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user