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 18:53:22 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-19 18:53:22 +0100
commit0af54d8a72c0c218e5fa847e61a5c98589662b79 (patch)
treeb6ebf24c8fcab9a8cabbdb307f682ecd632ac6e1 /src/command/cmd_funcs.c
parentc302af99b757257d07ebebc97cd2de0a516754e2 (diff)
downloadprofani-tty-0af54d8a72c0c218e5fa847e61a5c98589662b79.tar.gz
Add /roster color command
`/roster color on|off` to enable or disable XEP-0392 also for the
roster.

Regards https://github.com/profanity-im/profanity/issues/1191
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 2b9acb02..d55bc762 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -2739,6 +2739,11 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
             return TRUE;
         }
 
+    } else if (g_strcmp0(args[0], "color") == 0) {
+        _cmd_set_boolean_preference(args[1], command, "Roster consistent colors", PREF_ROSTER_COLOR_NICK);
+        ui_show_roster();
+        return TRUE;
+
     } else if (g_strcmp0(args[0], "unread") == 0) {
         if (g_strcmp0(args[1], "before") == 0) {
             cons_show("Roster unread message count: before");