mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 16:56:21 +00:00
Command '/statuses muc' now allows 'all', 'online' and 'none' settings
This commit is contained in:
@@ -2424,23 +2424,14 @@ cmd_statuses(gchar **args, struct cmd_help_t help)
|
||||
strcmp(args[0], "chat") != 0 &&
|
||||
strcmp(args[0], "muc") != 0) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "console") == 0 || strcmp(args[0], "chat") == 0) {
|
||||
if (strcmp(args[1], "all") != 0 &&
|
||||
strcmp(args[1], "online") != 0 &&
|
||||
strcmp(args[1], "none") != 0) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "muc") == 0) {
|
||||
if (strcmp(args[1], "on") != 0 && strcmp(args[1], "off") != 0) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
if (strcmp(args[1], "all") != 0 &&
|
||||
strcmp(args[1], "online") != 0 &&
|
||||
strcmp(args[1], "none") != 0) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "console") == 0) {
|
||||
@@ -2466,9 +2457,16 @@ cmd_statuses(gchar **args, struct cmd_help_t help)
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "muc") == 0) {
|
||||
_cmd_set_boolean_preference(args[1], help,
|
||||
"Chat room presence updates", PREF_STATUSES_MUC);
|
||||
prefs_set_string(PREF_STATUSES_MUC, args[1]);
|
||||
if (strcmp(args[1], "all") == 0) {
|
||||
cons_show("All presence updates will appear in chat room windows.");
|
||||
} else if (strcmp(args[1], "online") == 0) {
|
||||
cons_show("Only join/leave presence updates will appear in chat room windows.");
|
||||
} else {
|
||||
cons_show("Presence updates will not appear in chat room windows.");
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user