about summary refs log tree commit diff stats
path: root/jabber.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-03-08 00:46:24 +0000
committerJames Booth <boothj5@gmail.com>2012-03-08 00:46:24 +0000
commit78bd151c486626f79ea7dcb9189591d121e822b6 (patch)
treea014d2b6587579380c7b0300fe54c10a14b7dc2f /jabber.c
parent03b0c018491b7b49343c1a7c260b3a725b8a659e (diff)
downloadprofani-tty-78bd151c486626f79ea7dcb9189591d121e822b6.tar.gz
Added basic online list
Diffstat (limited to 'jabber.c')
-rw-r--r--jabber.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/jabber.c b/jabber.c
index cd291858..a77117dc 100644
--- a/jabber.c
+++ b/jabber.c
@@ -25,6 +25,7 @@
 
 #include "jabber.h"
 #include "log.h"
+#include "contact_list.h"
 #include "windows.h"
 
 #define PING_INTERVAL 120000 // 2 minutes
@@ -310,10 +311,12 @@ static int _jabber_presence_handler(xmpp_conn_t * const conn,
     else 
         status_str = NULL;
 
-    if (type == NULL) // online
+    if (type == NULL) {// online
         win_contact_online(short_from, show_str, status_str);
-    else // offline
+        contact_list_add(short_from);
+    } else {// offline
         win_contact_offline(short_from, show_str, status_str);
+    }
 
     win_page_off();