mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Removed /room info command, covered by /info
This commit is contained in:
parent
8b77f527c0
commit
c66d03539d
@ -1,4 +1,5 @@
|
||||
Reorganise/simplify room commands
|
||||
Add /room affiliation|role list with no arg to show all
|
||||
Fix room commands help
|
||||
Show role/affiliation on join
|
||||
Show role/affiliation on update
|
||||
|
@ -1291,7 +1291,6 @@ cmd_init(void)
|
||||
autocomplete_add(room_ac, "accept");
|
||||
autocomplete_add(room_ac, "destroy");
|
||||
autocomplete_add(room_ac, "config");
|
||||
autocomplete_add(room_ac, "info");
|
||||
autocomplete_add(room_ac, "role");
|
||||
autocomplete_add(room_ac, "affiliation");
|
||||
|
||||
|
@ -1501,6 +1501,7 @@ cmd_info(gchar **args, struct cmd_help_t help)
|
||||
win_type_t win_type = ui_current_win_type();
|
||||
PContact pcontact = NULL;
|
||||
Occupant *occupant = NULL;
|
||||
char *room = NULL;
|
||||
|
||||
if (conn_status != JABBER_CONNECTED) {
|
||||
cons_show("You are not currently connected.");
|
||||
@ -1510,6 +1511,7 @@ cmd_info(gchar **args, struct cmd_help_t help)
|
||||
switch (win_type)
|
||||
{
|
||||
case WIN_MUC:
|
||||
room = ui_current_recipient();
|
||||
if (usr) {
|
||||
char *room = ui_current_recipient();
|
||||
occupant = muc_roster_item(room, usr);
|
||||
@ -1519,7 +1521,10 @@ cmd_info(gchar **args, struct cmd_help_t help)
|
||||
ui_current_print_line("No such occupant \"%s\" in room.", usr);
|
||||
}
|
||||
} else {
|
||||
ui_current_print_line("You must specify a nickname.");
|
||||
ProfWin *window = wins_get_by_recipient(room);
|
||||
iq_room_info_request(room);
|
||||
ui_show_room_info(window, room);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case WIN_CHAT:
|
||||
@ -2237,8 +2242,7 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
(g_strcmp0(args[0], "destroy") != 0) &&
|
||||
(g_strcmp0(args[0], "config") != 0) &&
|
||||
(g_strcmp0(args[0], "role") != 0) &&
|
||||
(g_strcmp0(args[0], "affiliation") != 0) &&
|
||||
(g_strcmp0(args[0], "info") != 0)) {
|
||||
(g_strcmp0(args[0], "affiliation") != 0)) {
|
||||
cons_show("Usage: %s", help.usage);
|
||||
return TRUE;
|
||||
}
|
||||
@ -2252,12 +2256,6 @@ cmd_room(gchar **args, struct cmd_help_t help)
|
||||
ui_index = 0;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "info") == 0) {
|
||||
iq_room_info_request(room);
|
||||
ui_show_room_info(window, room);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "affiliation") == 0) {
|
||||
char *cmd = args[1];
|
||||
if (cmd == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user