about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
authorOlivier LE MOAL <olivier.lemoal@winamax.fr>2015-02-02 11:10:05 +0100
committerOlivier LE MOAL <olivier.lemoal@winamax.fr>2015-02-10 11:32:22 +0100
commit48f9f3b3b0d4e12f55ba5ea2c34695e899916c3d (patch)
tree374b896113ea765bbaf05545bc42da0ff66d3570 /src/command/commands.c
parent5c9dd2802a6aefcaa67cbf03a65128b595b587c9 (diff)
downloadprofani-tty-48f9f3b3b0d4e12f55ba5ea2c34695e899916c3d.tar.gz
Add XEP-0280 support
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 6eca1bd1..f6784fb5 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -730,7 +730,7 @@ cmd_help(gchar **args, struct cmd_help_t help)
 
     } else if (strcmp(args[0], "settings") == 0) {
         gchar *filter[] = { "/account", "/autoaway", "/autoping", "/autoconnect", "/beep",
-            "/chlog", "/flash", "/gone", "/grlog", "/history", "/intype",
+            "/carbons", "/chlog", "/flash", "/gone", "/grlog", "/history", "/intype",
             "/log", "/mouse", "/notify", "/outtype", "/prefs", "/priority",
             "/reconnect", "/roster", "/splash", "/states", "/statuses", "/theme",
             "/titlebar", "/vercheck", "/privileges", "/occupants", "/presence", "/wrap" };
@@ -3888,6 +3888,22 @@ cmd_history(gchar **args, struct cmd_help_t help)
 }
 
 gboolean
+cmd_carbons(gchar **args, struct cmd_help_t help)
+{
+    gboolean result = _cmd_set_boolean_preference(args[0], help,
+        "Carbons message", PREF_CARBONS);
+
+    // enable carbons
+    if (strcmp(args[0], "on") == 0) {
+        iq_enable_carbons();
+    }
+    else if (strcmp(args[0], "off") == 0){
+        iq_disable_carbons();
+    }
+    return result;
+}
+
+gboolean
 cmd_away(gchar **args, struct cmd_help_t help)
 {
     _update_presence(RESOURCE_AWAY, "away", args);