about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server_events.c2
-rw-r--r--src/ui/core.c13
-rw-r--r--src/ui/ui.h4
3 files changed, 13 insertions, 6 deletions
diff --git a/src/server_events.c b/src/server_events.c
index 3d949430..3916fc41 100644
--- a/src/server_events.c
+++ b/src/server_events.c
@@ -752,7 +752,7 @@ handle_muc_occupant_online(const char * const room, const char * const nick, con
     if (!existing) {
         char *muc_status_pref = prefs_get_string(PREF_STATUSES_MUC);
         if (g_strcmp0(muc_status_pref, "none") != 0) {
-            ui_room_member_online(room, nick, show, status);
+            ui_room_member_online(room, nick, role, affiliation, show, status);
         }
         prefs_free_string(muc_status_pref);
         ui_muc_roster(room);
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);