mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 16:06:21 +00:00
Handle room presence notifications
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user