Basic chat room handling of presence
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -524,6 +523,36 @@ win_show_room_roster(const char * const room)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user