From c65b43f081144b0edc4e14cc6b9c928cebdeebb3 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 3 Jun 2014 21:20:13 +0100 Subject: [PATCH] Show info in room for participant --- src/command/commands.c | 9 ++------- src/ui/core.c | 5 +++-- src/ui/ui.h | 1 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index 75da4fa3..100b90b5 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1395,14 +1395,9 @@ cmd_info(gchar **args, struct cmd_help_t help) { case WIN_MUC: if (usr != NULL) { - pcontact = muc_get_participant(recipient, usr); - if (pcontact != NULL) { - cons_show_info(pcontact); - } else { - cons_show("No such participant \"%s\" in room.", usr); - } + ui_info_room(usr); } else { - cons_show("No nickname supplied to /info in chat room."); + ui_current_print_line("You must specify a nickname."); } break; case WIN_CHAT: diff --git a/src/ui/core.c b/src/ui/core.c index 511facfb..d9a5d71b 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1832,7 +1832,7 @@ _ui_status_room(const char * const contact) win_vprint_line(current, '-', 0, "No such participant \"%s\" in room.", contact); } } -/* + static void _ui_info_room(const char * const contact) { @@ -1845,7 +1845,7 @@ _ui_info_room(const char * const contact) win_vprint_line(current, '-', 0, "No such participant \"%s\" in room.", contact); } } -*/ + static gint _ui_unread(void) { @@ -2174,6 +2174,7 @@ ui_init_module(void) ui_status = _ui_status; ui_status_private = _ui_status_private; ui_status_room = _ui_status_room; + ui_info_room = _ui_info_room; ui_unread = _ui_unread; ui_win_unread = _ui_win_unread; ui_ask_password = _ui_ask_password; diff --git a/src/ui/ui.h b/src/ui/ui.h index 559af82d..3a3c311c 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -151,6 +151,7 @@ void (*ui_handle_room_join_error)(const char * const room, const char * const er // contact status functions void (*ui_status_room)(const char * const contact); +void (*ui_info_room)(const char * const contact); void (*ui_status)(void); void (*ui_status_private)(void);