diff options
author | James Booth <boothj5@gmail.com> | 2012-11-14 01:16:07 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-11-14 01:16:07 +0000 |
commit | a970ea49cd9457b9281466d6e127b8b15a25fd1f (patch) | |
tree | d9fa3f9eb963c8236d8dfbae826760c88705d722 | |
parent | de2f060742ee4aa7d47fae12eefe0da1977b4125 (diff) | |
download | profani-tty-a970ea49cd9457b9281466d6e127b8b15a25fd1f.tar.gz |
Treat room presence as online
Needs to be changed to show status changes
-rw-r--r-- | src/jabber.c | 2 | ||||
-rw-r--r-- | src/windows.c | 17 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/jabber.c b/src/jabber.c index bdb801c9..86ea3901 100644 --- a/src/jabber.c +++ b/src/jabber.c @@ -741,8 +741,8 @@ _room_presence_handler(const char * const jid, xmpp_stanza_t * const stanza) show_str = xmpp_stanza_get_text(show); } else { show_str = "online"; - prof_handle_room_member_online(room, nick, show_str, status_str); } + prof_handle_room_member_online(room, nick, show_str, status_str); } } } diff --git a/src/windows.c b/src/windows.c index 00b77b14..43e6177f 100644 --- a/src/windows.c +++ b/src/windows.c @@ -237,22 +237,31 @@ win_show_wins(void) for (i = 1; i < NUM_WINS; i++) { if (_wins[i].type != WIN_UNUSED) { _win_show_time(_cons_win); - wprintw(_cons_win, "[%d] - ", i + 1); switch (_wins[i].type) { case WIN_CHAT: - wprintw(_cons_win, "conversation : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "conversation : %s", _wins[i].from); + PContact contact = contact_list_get_contact(_wins[i].from); + if (p_contact_name(contact) != NULL) { + wprintw(_cons_win, " (%s)", p_contact_name(contact)); + } + wprintw(_cons_win, ", %s", p_contact_presence(contact)); break; case WIN_PRIVATE: - wprintw(_cons_win, "private : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "private : %s", _wins[i].from); break; case WIN_MUC: - wprintw(_cons_win, "chat room : %s\n", _wins[i].from); + wprintw(_cons_win, "[%d] - ", i + 1); + wprintw(_cons_win, "chat room : %s", _wins[i].from); break; default: break; } + + wprintw(_cons_win, "\n"); } } } |