about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-10-06 00:38:29 +0100
committerJames Booth <boothj5@gmail.com>2014-10-06 00:38:29 +0100
commit2aeaad230e0095216c6a226ab4da8b03b3198e81 (patch)
tree68d5e96d96449ed54a8d37d15979107aee92bd97 /src/command/commands.c
parentd12534c58e5c466d2b9443e196df151205c2b879 (diff)
downloadprofani-tty-2aeaad230e0095216c6a226ab4da8b03b3198e81.tar.gz
Allow setting "none" affiliation
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index 39981b5f..7678f2c1 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -2206,13 +2206,18 @@ cmd_room(gchar **args, struct cmd_help_t help)
         if ((g_strcmp0(affiliation, "owner") != 0) &&
                 (g_strcmp0(affiliation, "admin") != 0) &&
                 (g_strcmp0(affiliation, "member") != 0) &&
+                (g_strcmp0(affiliation, "none") != 0) &&
                 (g_strcmp0(affiliation, "outcast") != 0)) {
             cons_show("Usage: %s", help.usage);
             return TRUE;
         }
 
         if (g_strcmp0(cmd, "list") == 0) {
-            iq_room_affiliation_list(room, affiliation);
+            if (g_strcmp0(affiliation, "none") == 0) {
+                win_save_print(window, '!', NULL, 0, 0, "", "Cannot list users with no affiliation.");
+            } else {
+                iq_room_affiliation_list(room, affiliation);
+            }
             return TRUE;
         }