diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/core.c | 13 | ||||
-rw-r--r-- | src/ui/ui.h | 4 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 67a8f1a1..eed865bb 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1508,14 +1508,21 @@ _ui_room_member_banned(const char * const room, const char * const nick, const c } static void -_ui_room_member_online(const char * const room, const char * const nick, - const char * const show, const char * const status) +_ui_room_member_online(const char * const room, const char * const nick, const char * const role, + const char * const affiliation, const char * const show, const char * const status) { ProfWin *window = wins_get_by_recipient(room); if (window == NULL) { log_error("Received online presence for room participant %s, but no window open for %s.", nick, room); } else { - win_save_vprint(window, '!', NULL, 0, COLOUR_ONLINE, "", "-> %s has joined the room.", nick); + win_save_vprint(window, '!', NULL, NO_EOL, COLOUR_ONLINE, "", "-> %s has joined the room", nick); + if (role) { + win_save_vprint(window, '!', NULL, NO_DATE | NO_EOL, COLOUR_ONLINE, "", ", role: %s", role); + } + if (affiliation) { + win_save_vprint(window, '!', NULL, NO_DATE | NO_EOL, COLOUR_ONLINE, "", ", affiliation: %s", affiliation); + } + win_save_print(window, '!', NULL, NO_DATE, COLOUR_ROOMINFO, "", ""); } } diff --git a/src/ui/ui.h b/src/ui/ui.h index add0a3d2..46582549 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -158,8 +158,8 @@ void (*ui_leave_room)(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); -void (*ui_room_member_online)(const char * const room, - const char * const nick, const char * const show, const char * const status); +void (*ui_room_member_online)(const char * const room, const char * const nick, const char * const roles, + const char * const affiliation, const char * const show, const char * const status); void (*ui_room_member_nick_change)(const char * const room, const char * const old_nick, const char * const nick); void (*ui_room_nick_change)(const char * const room, const char * const nick); |