aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/bee_chat.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-05-08 01:45:10 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-05-08 01:45:10 +0100
commitb17ce85d2c4e69637531a7989b30c7011832ccb9 (patch)
tree6002b01b62fd3edfaa7632529e7e551face07f43 /protocols/bee_chat.c
parent27e2c66f28bc196d766ac179aa5eae0d190565d5 (diff)
Users leaving really show up again.
Diffstat (limited to 'protocols/bee_chat.c')
-rw-r--r--protocols/bee_chat.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/protocols/bee_chat.c b/protocols/bee_chat.c
index 0c7bebd9..f1d1a2c1 100644
--- a/protocols/bee_chat.c
+++ b/protocols/bee_chat.c
@@ -197,34 +197,31 @@ void imcb_chat_add_buddy( struct groupchat *c, const char *handle )
c->joined = 1;
}
-/* This function is one BIG hack... :-( EREWRITE */
-void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
+void imcb_chat_remove_buddy( struct groupchat *c, const char *handle, const char *reason )
{
-#if 0
- user_t *u;
- int me = 0;
+ struct im_connection *ic = c->ic;
+ bee_t *bee = ic->bee;
+ bee_user_t *bu = NULL;
- if( set_getbool( &b->ic->bee->set, "debug" ) )
- imcb_log( b->ic, "User %s removed from conversation %p (%s)", handle, b, reason ? reason : "" );
+ if( set_getbool( &bee->set, "debug" ) )
+ imcb_log( ic, "User %s removed from conversation %p (%s)", handle, c, reason ? reason : "" );
/* It might be yourself! */
- if( g_strcasecmp( handle, b->ic->acc->user ) == 0 )
+ if( g_strcasecmp( handle, ic->acc->user ) == 0 )
{
- if( b->joined == 0 )
+ if( c->joined == 0 )
return;
- u = user_find( b->ic->irc, b->ic->irc->nick );
- b->joined = 0;
- me = 1;
+ bu = bee->user;
+ c->joined = 0;
}
else
{
- u = user_findhandle( b->ic, handle );
+ bu = bee_user_by_handle( bee, ic, handle );
}
- if( me || ( remove_chat_buddy_silent( b, handle ) && b->joined && u ) )
- irc_part( b->ic->irc, u, b->channel );
-#endif
+ if( bee->ui->chat_remove_user )
+ bee->ui->chat_remove_user( bee, c, bu );
}
#if 0