diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 14 | ||||
-rw-r--r-- | src/ui/ui.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 500e435b..7c6d24cb 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1887,6 +1887,19 @@ _ui_draw_term_title(void) } static void +_ui_show_room_info(ProfWin *window, const char * const room) +{ + char *role = muc_role_str(room); + char *affiliation = muc_affiliation_str(room); + + win_save_print(window, '-', NULL, 0, 0, "", ""); + win_save_vprint(window, '!', NULL, 0, 0, "", "Room: %s", room); + win_save_vprint(window, '!', NULL, 0, 0, "", " Affiliation: %s", affiliation); + win_save_vprint(window, '!', NULL, 0, 0, "", " Role: %s", role); + win_save_print(window, '-', NULL, 0, 0, "", ""); +} + +static void _ui_handle_form_field(ProfWin *window, char *tag, FormField *field) { win_save_vprint(window, '-', NULL, NO_EOL, COLOUR_AWAY, "", "[%s] ", tag); @@ -2513,4 +2526,5 @@ ui_init_module(void) ui_show_form_field_help = _ui_show_form_field_help; ui_show_lines = _ui_show_lines; ui_handle_room_configuration_form_error = _ui_handle_room_configuration_form_error; + ui_show_room_info = _ui_show_room_info; } diff --git a/src/ui/ui.h b/src/ui/ui.h index d71a78c1..85649c0e 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -137,6 +137,7 @@ void (*ui_room_subject)(const char * const room_jid, const char * const subject); void (*ui_room_requires_config)(const char * const room_jid); void (*ui_room_destroyed)(const char * const room_jid); +void (*ui_show_room_info)(ProfWin *window, const char * const room); void (*ui_room_broadcast)(const char * const room_jid, const char * const message); void (*ui_room_member_offline)(const char * const room, const char * const nick); |