From c66d03539dbe0019149a51e6aa0c68c5d5acb394 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 11 Oct 2014 23:37:04 +0100 Subject: Removed /room info command, covered by /info --- src/command/commands.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/command/commands.c') diff --git a/src/command/commands.c b/src/command/commands.c index 3f927407..89afc05c 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -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) { -- cgit 1.4.1-2-gfad0