Handle room presence notifications

This commit is contained in:
James Booth
2012-11-05 21:36:32 +00:00
parent 0deba9e13e
commit 2f6361a578
6 changed files with 53 additions and 2 deletions

View File

@@ -470,6 +470,33 @@ win_show_outgoing_msg(const char * const from, const char * const to,
_win_switch_if_active(win_index);
}
void
win_join_chat(const char * const room_jid, const char * const nick)
{
int win_index = _find_prof_win_index(room_jid);
// create new window
if (win_index == NUM_WINS) {
win_index = _new_prof_win(room_jid);
}
_win_switch_if_active(win_index);
}
void
win_show_chat_room_member(const char * const room_jid, const char * const nick)
{
int win_index = _find_prof_win_index(room_jid);
WINDOW *win = _wins[win_index].win;
wattron(win, COLOUR_ONLINE);
wprintw(win, "%s\n", nick);
wattroff(win, COLOUR_ONLINE);
if (win_index == _curr_prof_win)
dirty = TRUE;
}
void
win_show(const char * const msg)
{