mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 22:56:21 +00:00
Changed /statuses preferences
This commit is contained in:
@@ -2264,6 +2264,7 @@ cmd_statuses(gchar **args, struct cmd_help_t help)
|
||||
strcmp(args[1], "online") != 0 &&
|
||||
strcmp(args[1], "none") != 0) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2271,8 +2272,36 @@ cmd_statuses(gchar **args, struct cmd_help_t help)
|
||||
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[0], "console") == 0) {
|
||||
prefs_set_string(PREF_STATUSES_CONSOLE, args[1]);
|
||||
if (strcmp(args[1], "all") == 0) {
|
||||
cons_show("All presence updates will appear in the console.");
|
||||
} else if (strcmp(args[1], "online") == 0) {
|
||||
cons_show("Only online/offline presence updates will appear in the console.");
|
||||
} else {
|
||||
cons_show("Presence updates will not appear in the console.");
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "chat") == 0) {
|
||||
prefs_set_string(PREF_STATUSES_CHAT, args[1]);
|
||||
if (strcmp(args[1], "all") == 0) {
|
||||
cons_show("All presence updates will appear in chat windows.");
|
||||
} else if (strcmp(args[1], "online") == 0) {
|
||||
cons_show("Only online/offline presence updates will appear in chat windows.");
|
||||
} else {
|
||||
cons_show("Presence updates will not appear in chat windows.");
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "muc") == 0) {
|
||||
_cmd_set_boolean_preference(args[1], help,
|
||||
"Chat room presence updates", PREF_STATUSES_MUC);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -293,6 +293,9 @@ _get_group(preference_t pref)
|
||||
case PREF_HISTORY:
|
||||
case PREF_MOUSE:
|
||||
case PREF_STATUSES:
|
||||
case PREF_STATUSES_CONSOLE:
|
||||
case PREF_STATUSES_CHAT:
|
||||
case PREF_STATUSES_MUC:
|
||||
case PREF_OTR_WARN:
|
||||
return "ui";
|
||||
case PREF_STATES:
|
||||
@@ -343,6 +346,12 @@ _get_key(preference_t pref)
|
||||
return "mouse";
|
||||
case PREF_STATUSES:
|
||||
return "statuses";
|
||||
case PREF_STATUSES_CONSOLE:
|
||||
return "statuses.console";
|
||||
case PREF_STATUSES_CHAT:
|
||||
return "statuses.chat";
|
||||
case PREF_STATUSES_MUC:
|
||||
return "statuses.muc";
|
||||
case PREF_STATES:
|
||||
return "enabled";
|
||||
case PREF_OUTTYPE:
|
||||
|
||||
@@ -46,6 +46,9 @@ typedef enum {
|
||||
PREF_HISTORY,
|
||||
PREF_MOUSE,
|
||||
PREF_STATUSES,
|
||||
PREF_STATUSES_CONSOLE,
|
||||
PREF_STATUSES_CHAT,
|
||||
PREF_STATUSES_MUC,
|
||||
PREF_STATES,
|
||||
PREF_OUTTYPE,
|
||||
PREF_NOTIFY_TYPING,
|
||||
|
||||
Reference in New Issue
Block a user