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-09 16:12:54 +0100
committerMichael Vetter <jubalh@iodoru.org>2019-12-09 16:12:54 +0100
commitddf6ada3d110ea2f20ffd69070bcc199c9426733 (patch)
tree2bb1ed9ba296f83f3e2ab9c0319bda276e1d89b6 /src/command/cmd_funcs.c
parent7a0a578a8a56cb6689ac9fce680aa44f5af8926d (diff)
downloadprofani-tty-ddf6ada3d110ea2f20ffd69070bcc199c9426733.tar.gz
Add initial support for XEP-0392
The last 3 commits added basic support.
Thanks @aaptel!

This commit adds basic settings interface to use it.
See `/color on|off`.

We still have to enable settings for color blindness.
And maybe another setting to decide whether to color the
occupantslist/roster with the same algo.

Regards https://github.com/profanity-im/profanity/issues/1191
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index ccf5c62e..2b7894ad 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -8626,3 +8626,10 @@ cmd_paste(ProfWin *window, const char *const command, gchar **args)
 
     return TRUE;
 }
+
+gboolean
+cmd_color(ProfWin *window, const char *const command, gchar **args)
+{
+    _cmd_set_boolean_preference(args[0], command, "Consistent color generation for nicks", PREF_COLOR_NICK);
+    return TRUE;
+}