aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/conference.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2010-06-03 12:31:46 +0200
committerSven Moritz Hallberg <pesco@khjk.org>2010-06-03 12:31:46 +0200
commit3f81999c20852f14a5fb27a6ef6c5ea44db61a4d (patch)
tree14fa6a79d444049e758be853277270117e11692b /protocols/jabber/conference.c
parentfc34fb5d0b717d90edfc7ed78f11166eb23c536e (diff)
parent2e44b1f12fb58a6969a8fbaf2946d6ecdace484a (diff)
merge in bitlbee 1.2.4
Diffstat (limited to 'protocols/jabber/conference.c')
-rw-r--r--protocols/jabber/conference.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index 480006bd..f434c58a 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -233,8 +233,10 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu
if( ( s = xt_find_attr( c, "xmlns" ) ) &&
( strcmp( s, XMLNS_MUC_USER ) == 0 ) )
{
- c = xt_find_node( c->children, "item" );
- if( ( s = xt_find_attr( c, "jid" ) ) )
+ struct xt_node *item;
+
+ item = xt_find_node( c->children, "item" );
+ if( ( s = xt_find_attr( item, "jid" ) ) )
{
/* Yay, found what we need. :-) */
bud->ext_jid = jabber_normalize( s );
@@ -282,12 +284,15 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu
}
else if( type ) /* type can only be NULL or "unavailable" in this function */
{
- s = strchr( bud->ext_jid, '/' );
- if( s ) *s = 0;
- imcb_chat_remove_buddy( chat, bud->ext_jid, NULL );
- if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS )
- imcb_remove_buddy( ic, bud->ext_jid, NULL );
- if( s ) *s = '/';
+ if( ( bud->flags & JBFLAG_IS_CHATROOM ) && bud->ext_jid )
+ {
+ s = strchr( bud->ext_jid, '/' );
+ if( s ) *s = 0;
+ imcb_chat_remove_buddy( chat, bud->ext_jid, NULL );
+ if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS )
+ imcb_remove_buddy( ic, bud->ext_jid, NULL );
+ if( s ) *s = '/';
+ }
if( bud == jc->me )
jabber_chat_free( chat );