Ignore:
Timestamp:
2010-05-08T00:45:10Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
e4816ea
Parents:
27e2c66
Message:

Users leaving really show up again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/bee_chat.c

    r27e2c66 rb17ce85  
    198198}
    199199
    200 /* This function is one BIG hack... :-( EREWRITE */
    201 void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
    202 {
    203 #if 0
    204         user_t *u;
    205         int me = 0;
    206        
    207         if( set_getbool( &b->ic->bee->set, "debug" ) )
    208                 imcb_log( b->ic, "User %s removed from conversation %p (%s)", handle, b, reason ? reason : "" );
     200void imcb_chat_remove_buddy( struct groupchat *c, const char *handle, const char *reason )
     201{
     202        struct im_connection *ic = c->ic;
     203        bee_t *bee = ic->bee;
     204        bee_user_t *bu = NULL;
     205       
     206        if( set_getbool( &bee->set, "debug" ) )
     207                imcb_log( ic, "User %s removed from conversation %p (%s)", handle, c, reason ? reason : "" );
    209208       
    210209        /* It might be yourself! */
    211         if( g_strcasecmp( handle, b->ic->acc->user ) == 0 )
    212         {
    213                 if( b->joined == 0 )
     210        if( g_strcasecmp( handle, ic->acc->user ) == 0 )
     211        {
     212                if( c->joined == 0 )
    214213                        return;
    215214               
    216                 u = user_find( b->ic->irc, b->ic->irc->nick );
    217                 b->joined = 0;
    218                 me = 1;
     215                bu = bee->user;
     216                c->joined = 0;
    219217        }
    220218        else
    221219        {
    222                 u = user_findhandle( b->ic, handle );
    223         }
    224        
    225         if( me || ( remove_chat_buddy_silent( b, handle ) && b->joined && u ) )
    226                 irc_part( b->ic->irc, u, b->channel );
    227 #endif
     220                bu = bee_user_by_handle( bee, ic, handle );
     221        }
     222       
     223        if( bee->ui->chat_remove_user )
     224                bee->ui->chat_remove_user( bee, c, bu );
    228225}
    229226
Note: See TracChangeset for help on using the changeset viewer.