about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index fd50f08b..eb3ef91b 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2200,7 +2200,7 @@ cmd_notify(gchar **args, struct cmd_help_t help)
     // bad kind
     if ((strcmp(kind, "message") != 0) && (strcmp(kind, "typing") != 0) &&
             (strcmp(kind, "remind") != 0) && (strcmp(kind, "invite") != 0) &&
-            (strcmp(kind, "sub") != 0)) {
+            (strcmp(kind, "sub") != 0) && (strcmp(kind, "room") != 0)) {
         cons_show("Usage: %s", help.usage);
 
     // set message setting
@@ -2215,6 +2215,18 @@ cmd_notify(gchar **args, struct cmd_help_t help)
             cons_show("Usage: /notify message on|off");
         }
 
+    // set room setting
+    } else if (strcmp(kind, "room") == 0) {
+        if (strcmp(value, "on") == 0) {
+            cons_show("Chat room notifications enabled.");
+            prefs_set_boolean(PREF_NOTIFY_ROOM, TRUE);
+        } else if (strcmp(value, "off") == 0) {
+            cons_show("Chat room notifications disabled.");
+            prefs_set_boolean(PREF_NOTIFY_ROOM, FALSE);
+        } else {
+            cons_show("Usage: /notify room on|off");
+        }
+
     // set typing setting
     } else if (strcmp(kind, "typing") == 0) {
         if (strcmp(value, "on") == 0) {