about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-10-05 03:52:55 +0100
committerJames Booth <boothj5@gmail.com>2014-10-05 03:52:55 +0100
commitac7bc02c63a5aed8decfcbbdc5582e9e5b389030 (patch)
tree302fa5fcd1ea72e67071d2043051eef3fef12ea1 /src/command/command.c
parent7584ddaa62033f876b78a4de8b32d8e1e90e0619 (diff)
downloadprofani-tty-ac7bc02c63a5aed8decfcbbdc5582e9e5b389030.tar.gz
Added /room kick command
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command/command.c b/src/command/command.c
index 1f8977b7..90f168d1 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -1251,6 +1251,7 @@ cmd_init(void)
     autocomplete_add(room_ac, "config");
     autocomplete_add(room_ac, "info");
     autocomplete_add(room_ac, "subject");
+    autocomplete_add(room_ac, "kick");
     autocomplete_add(room_ac, "role");
     autocomplete_add(room_ac, "affiliation");
 
@@ -2311,6 +2312,15 @@ _room_autocomplete(char *input, int *size)
         return result;
     }
 
+    char *recipient = ui_current_recipient();
+    Autocomplete nick_ac = muc_roster_ac(recipient);
+    if (nick_ac != NULL) {
+        result = autocomplete_param_with_ac(input, size, "/room kick", nick_ac, TRUE);
+        if (result != NULL) {
+            return result;
+        }
+    }
+
     result = autocomplete_param_with_ac(input, size, "/room", room_ac, TRUE);
     if (result != NULL) {
         return result;