about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-11-14 01:16:07 +0000
committerJames Booth <boothj5@gmail.com>2012-11-14 01:16:07 +0000
commita970ea49cd9457b9281466d6e127b8b15a25fd1f (patch)
treed9fa3f9eb963c8236d8dfbae826760c88705d722
parentde2f060742ee4aa7d47fae12eefe0da1977b4125 (diff)
downloadprofani-tty-a970ea49cd9457b9281466d6e127b8b15a25fd1f.tar.gz
Treat room presence as online
Needs to be changed to show status changes
-rw-r--r--src/jabber.c2
-rw-r--r--src/windows.c17
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");
             }
         }
     }