--- a/mcabber/src/commands.c Sun Sep 25 01:04:48 2005 +0200
+++ b/mcabber/src/commands.c Sun Sep 25 23:45:34 2005 +0200
@@ -153,6 +153,7 @@
compl_add_category_word(COMPL_ROOM, "leave");
compl_add_category_word(COMPL_ROOM, "names");
compl_add_category_word(COMPL_ROOM, "remove");
+ compl_add_category_word(COMPL_ROOM, "unlock");
}
// expandalias(line)
@@ -975,8 +976,6 @@
}
do_info(NULL);
} else if (!strcasecmp(arg, "remove")) {
- gpointer bud;
- bud = BUDDATA(current_buddy);
if (!(buddy_gettype(bud) & ROSTER_TYPE_ROOM)) {
scr_LogPrint(LPRINT_NORMAL, "This isn't a chatroom");
return;
@@ -990,6 +989,12 @@
roster_del_user(buddy_getjid(bud));
buddylist_build();
update_roster = TRUE;
+ } else if (!strcasecmp(arg, "unlock")) {
+ if (!(buddy_gettype(bud) & ROSTER_TYPE_ROOM)) {
+ scr_LogPrint(LPRINT_NORMAL, "This isn't a chatroom");
+ return;
+ }
+ jb_room_unlock(buddy_getjid(bud));
} else {
scr_LogPrint(LPRINT_NORMAL, "Unrecognized parameter!");
}