about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 2a9efc0f..91971911 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -307,15 +307,17 @@ static struct cmd_t command_defs[] =
 
     { "/room",
         cmd_room, parse_args, 1, 3, NULL,
-        { "/room config accept|destroy|config|submit|cancel [tag value]", "Room configuration.",
-        { "/room config accept|destroy|config|submit|cancel [tag value]",
-          "------------------------------------------------------------",
+        { "/room config accept|destroy|config|submit|cancel|set|add|remove [tag value]", "Room configuration.",
+        { "/room config accept|destroy|config|submit|cancel|set|add|remove [tag value]",
+          "---------------------------------------------------------------------------",
           "config accept  - Accept default room configuration.",
           "config destroy - Cancel default room configuration.",
           "config config  - Edit room configuration.",
           "config submit  - Cancel room configuration.",
           "config cancel  - Cancel room configuration.",
-          "config set tag value - Set room configuration field to value.",
+          "config set tag value    - Set room configuration field to value.",
+          "config add tag value    - Add value to room configuration field.",
+          "config remove tag value - Remove value from room configuration field.",
           NULL } } },
 
     { "/rooms",
@@ -1217,6 +1219,8 @@ cmd_init(void)
     autocomplete_add(room_ac, "submit");
     autocomplete_add(room_ac, "cancel");
     autocomplete_add(room_ac, "set");
+    autocomplete_add(room_ac, "add");
+    autocomplete_add(room_ac, "remove");
 
     cmd_history_init();
 }
@@ -2087,6 +2091,14 @@ _room_autocomplete(char *input, int *size)
             if (result != NULL) {
                 return result;
             }
+            result = autocomplete_param_with_ac(input, size, "/room add", form->tag_ac, TRUE);
+            if (result != NULL) {
+                return result;
+            }
+            result = autocomplete_param_with_ac(input, size, "/room remove", form->tag_ac, TRUE);
+            if (result != NULL) {
+                return result;
+            }
         }
     }