about summary refs log tree commit diff stats
path: root/src/windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows.c')
-rw-r--r--src/windows.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/windows.c b/src/windows.c
index 91b6ee31..8f3bd19a 100644
--- a/src/windows.c
+++ b/src/windows.c
@@ -500,8 +500,7 @@ win_show_room_roster(const char * const room)
     int win_index = _find_prof_win_index(room);
     WINDOW *win = _wins[win_index].win;
 
-    GSList *roster = room_get_roster(room);
-
+    GList *roster = room_get_roster(room);
 
     if (roster != NULL) {
         wprintw(win, "Room occupants:\n");
@@ -514,7 +513,7 @@ win_show_room_roster(const char * const room)
         if (roster->next != NULL) {
             wprintw(win, ", ");
         }
-        roster = g_slist_next(roster);
+        roster = g_list_next(roster);
     }
     wprintw(win, "\n");
 
@@ -525,6 +524,36 @@ win_show_room_roster(const char * const room)
 }
 
 void
+win_show_room_member_offline(const char * const room, const char * const nick)
+{
+    int win_index = _find_prof_win_index(room);
+    WINDOW *win = _wins[win_index].win;
+
+    _win_show_time(win);
+    wattron(win, COLOUR_OFFLINE);
+    wprintw(win, "-- %s has left the room.\n", nick);
+    wattroff(win, COLOUR_OFFLINE);
+
+    if (win_index == _curr_prof_win)
+        dirty = TRUE;
+}
+
+void
+win_show_room_member_online(const char * const room, const char * const nick)
+{
+    int win_index = _find_prof_win_index(room);
+    WINDOW *win = _wins[win_index].win;
+
+    _win_show_time(win);
+    wattron(win, COLOUR_ONLINE);
+    wprintw(win, "++ %s has joined the room.\n", nick);
+    wattroff(win, COLOUR_ONLINE);
+
+    if (win_index == _curr_prof_win)
+        dirty = TRUE;
+}
+
+void
 win_show_room_history(const char * const room_jid, const char * const nick,
     GTimeVal tv_stamp, const char * const message)
 {