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/command.c | 1 - src/command/commands.c | 16 +++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'src/command') diff --git a/src/command/command.c b/src/command/command.c index e8697920..b131dcf9 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -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"); 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
b3b32373 ^




























1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29