Mercurial > ~mikael > mcabber > hg
diff mcabber/src/roster.c @ 610:0e8247cf2bd1
Consider buddies as offline when they have cancelled our subscription
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 15 Dec 2005 19:56:19 +0100 |
parents | cf722bff6579 |
children | 97dd14e22b2a |
line wrap: on
line diff
--- a/mcabber/src/roster.c Thu Dec 15 18:51:06 2005 +0100 +++ b/mcabber/src/roster.c Thu Dec 15 19:56:19 2005 +0100 @@ -595,6 +595,22 @@ return roster_usr->type; } +// roster_unsubscribed() +// We have lost buddy's presence updates; this function clears the status +// message, sets the buddy offline and frees the resources +void roster_unsubscribed(const char *jid) +{ + GSList *sl_user; + roster *roster_usr; + + sl_user = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_AGENT); + if (sl_user == NULL) + return; + + roster_usr = (roster*)sl_user->data; + free_all_resources(&roster_usr->resource); +} + /* ### BuddyList functions ### */