Changeset b17ce85


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

Users leaving really show up again.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • irc_im.c

    r27e2c66 rb17ce85  
    250250       
    251251        irc_channel_printf( ic, "%s", text );
     252       
     253        return TRUE;
    252254}
    253255
     
    273275       
    274276        irc_channel_add_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data );
     277       
     278        return TRUE;
    275279}
    276280
    277281gboolean bee_irc_chat_remove_user( bee_t *bee, struct groupchat *c, bee_user_t *bu )
    278282{
     283        irc_t *irc = bee->ui_data;
     284       
     285        irc_channel_del_user( c->ui_data, bu == bee->user ? irc->user : bu->ui_data );
     286       
     287        return TRUE;
    279288}
    280289
     
    319328        bee_irc_chat_msg,
    320329        bee_irc_chat_add_user,
    321         NULL,
     330        bee_irc_chat_remove_user,
    322331       
    323332        bee_irc_ft_in_start,
  • 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.