From 7d90d218c0858ce278c8223fe72c455e3f950732 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 24 May 2014 15:54:10 +0100 Subject: Split regular and chat room notify settings --- src/command/commands.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/command/commands.c') 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) { -- cgit 1.4.1-2-gfad0