about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-12-19 19:14:59 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-19 19:14:59 +0100
commit808850c6f5c85b0e173e922b9979ca3a09b4dc31 (patch)
treeef37d004827224fe8662b3b850d21888a950a230 /src/command/cmd_funcs.c
parent6d82020a66505e9c58b26091684e5f78ac71d210 (diff)
downloadprofani-tty-808850c6f5c85b0e173e922b9979ca3a09b4dc31.tar.gz
Add /occupants color command
`/occupants color on|off` to enable or disable XEP-0392 also for the
MUC occupants.

Regards
https://github.com/profanity-im/profanity/issues/1191
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index d55bc762..aa1f21c3 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -4442,6 +4442,12 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args)
         return TRUE;
     }
 
+    if (g_strcmp0(args[0], "color") == 0) {
+        _cmd_set_boolean_preference(args[1], command, "Occupants consistent colors", PREF_OCCUPANTS_COLOR_NICK);
+        occupantswin_occupants_all();
+        return TRUE;
+    }
+
     if (g_strcmp0(args[0], "default") == 0) {
         if (g_strcmp0(args[1], "show") == 0) {
             if (g_strcmp0(args[2], "jid") == 0) {