Mercurial > hg
diff mcabber/src/jabglue.c @ 164:faf534be8ff0
[/trunk] Changeset 176 by mikael
* Add roster_free()
* Empty roster when disconnecting from the server / going offline
* Don't display buddies status when we're offline
* Fix a bug when the roster is empty and we try to send a message (commands.c)
author | mikael |
---|---|
date | Mon, 02 May 2005 20:31:01 +0000 |
parents | ba51d1737086 |
children | b4921dbf8709 |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Mon May 02 14:18:55 2005 +0000 +++ b/mcabber/src/jabglue.c Mon May 02 20:31:01 2005 +0000 @@ -159,8 +159,8 @@ xmlnode x, z; char *cid; - if (!online) - return; + if (!online) return; + if (jc && jc->state == JCONN_STATE_CONNECTING) { jab_start(jc); return; @@ -213,8 +213,7 @@ { xmlnode x; - if (!online) - return; + if (!online) return; x = jutil_presnew(JPACKET__UNKNOWN, 0, 0); @@ -271,6 +270,11 @@ //sendvisibility(); ??? + // We'll need to update the roster if we switch to/from offline because + // we don't know the presences of buddies when offline... + if (mystatus == offline || st == offline) + update_roster = TRUE; + hk_mystatuschange(0, mystatus, st); mystatus = st; } @@ -443,6 +447,8 @@ online = FALSE; mystatus = offline; + roster_free(); + update_roster = TRUE; if (previous_state != JCONN_STATE_OFF) { scr_LogPrint("+ JCONN_STATE_OFF");