diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/jabber/conference.c | 2 | ||||
| -rw-r--r-- | protocols/jabber/presence.c | 11 | ||||
| -rw-r--r-- | protocols/jabber/xmltree.c | 2 | ||||
| -rw-r--r-- | protocols/nogaim.c | 9 | 
4 files changed, 20 insertions, 4 deletions
| diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index c16236b3..f0d8f050 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -162,6 +162,8 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu  		if( bud == jc->me )  		{ +			jabber_buddy_remove_bare( ic, jc->name ); +			  			g_free( jc->name );  			g_free( jc );  			imcb_chat_free( chat ); diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index 096b4fd5..1310fce3 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -167,6 +167,7 @@ int presence_send_update( struct im_connection *ic )  	struct xt_node *node;  	char *show = jd->away_state->code;  	char *status = jd->away_message; +	struct groupchat *c;  	int st;  	node = jabber_make_packet( "presence", NULL, NULL, NULL ); @@ -178,6 +179,16 @@ int presence_send_update( struct im_connection *ic )  	st = jabber_write_packet( ic, node ); +	/* Have to send this update to all groupchats too, the server won't +	   do this automatically. */ +	for( c = ic->groupchats; c && st; c = c->next ) +	{ +		struct jabber_chat *jc = c->data; +		 +		xt_add_attr( node, "to", jc->me->full_jid ); +		st = jabber_write_packet( ic, node ); +	} +	  	xt_free_node( node );  	return st;  } diff --git a/protocols/jabber/xmltree.c b/protocols/jabber/xmltree.c index 9e16b939..c8bef362 100644 --- a/protocols/jabber/xmltree.c +++ b/protocols/jabber/xmltree.c @@ -187,7 +187,7 @@ int xt_handle( struct xt_parser *xt, struct xt_node *node, int depth )  						/* If there's no parent, the handler should mention <root> as a parent. */  			                       g_strcasecmp( xt->handlers[i].parent, "<root>" ) == 0 ) ) )  			{ -//				xt_print( node ); +				xt_print( node );  				st = xt->handlers[i].func( node, xt->data ); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 5b1c4346..5a9f5b3e 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -806,6 +806,7 @@ void imcb_chat_add_buddy( struct groupchat *b, char *handle )  	}  } +/* This function is one BIG hack... :-( EREWRITE */  void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )  {  	user_t *u; @@ -817,6 +818,9 @@ void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )  	/* It might be yourself! */  	if( g_strcasecmp( handle, b->ic->acc->user ) == 0 )  	{ +		if( b->joined == 0 ) +			return; +		  		u = user_find( b->ic->irc, b->ic->irc->nick );  		b->joined = 0;  		me = 1; @@ -826,9 +830,8 @@ void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )  		u = user_findhandle( b->ic, handle );  	} -	if( remove_chat_buddy_silent( b, handle ) ) -		if( ( b->joined || me ) && u ) -			irc_part( b->ic->irc, u, b->channel ); +	if( me || ( remove_chat_buddy_silent( b, handle ) && b->joined && u ) ) +		irc_part( b->ic->irc, u, b->channel );  }  static int remove_chat_buddy_silent( struct groupchat *b, char *handle ) | 
