diff options
author | James Booth <boothj5@gmail.com> | 2015-05-07 22:05:36 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-05-07 22:05:36 +0100 |
commit | a2c62117322eea58c17231c27c5ee3b41900ea81 (patch) | |
tree | 0f0278419d0eb8d02c70fc6ca535124fecf186c3 /src/event | |
parent | 6fd9b179a08126deb20d6efedac3089e9bf432cb (diff) | |
download | profani-tty-a2c62117322eea58c17231c27c5ee3b41900ea81.tar.gz |
Added ui_contact_online
Diffstat (limited to 'src/event')
-rw-r--r-- | src/event/server_events.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/src/event/server_events.c b/src/event/server_events.c index e409e06a..e2e910a3 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -280,42 +280,12 @@ sv_ev_contact_offline(char *barejid, char *resource, char *status) } void -sv_ev_contact_online(char *barejid, Resource *resource, - GDateTime *last_activity) +sv_ev_contact_online(char *barejid, Resource *resource, GDateTime *last_activity) { gboolean updated = roster_update_presence(barejid, resource, last_activity); if (updated) { - char *show_console = prefs_get_string(PREF_STATUSES_CONSOLE); - char *show_chat_win = prefs_get_string(PREF_STATUSES_CHAT); - PContact contact = roster_get_contact(barejid); - if (p_contact_subscription(contact)) { - if (strcmp(p_contact_subscription(contact), "none") != 0) { - - // show in console if "all" - if (g_strcmp0(show_console, "all") == 0) { - cons_show_contact_online(contact, resource, last_activity); - - // show in console of "online" and presence online - } else if (g_strcmp0(show_console, "online") == 0 && - resource->presence == RESOURCE_ONLINE) { - cons_show_contact_online(contact, resource, last_activity); - - } - - // show in chat win if "all" - if (g_strcmp0(show_chat_win, "all") == 0) { - ui_chat_win_contact_online(contact, resource, last_activity); - - // show in char win if "online" and presence online - } else if (g_strcmp0(show_chat_win, "online") == 0 && - resource->presence == RESOURCE_ONLINE) { - ui_chat_win_contact_online(contact, resource, last_activity); - } - } - } - prefs_free_string(show_console); - prefs_free_string(show_chat_win); + ui_contact_online(barejid, resource, last_activity); } rosterwin_roster(); |