Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/bee_chat.c

    r885d294 rbe1efa3  
    8080}
    8181
     82static gboolean handle_is_self( struct im_connection *ic, const char *handle )
     83{
     84        return ( ic->acc->prpl->handle_is_self ) ?
     85                 ic->acc->prpl->handle_is_self( ic, handle ) :
     86                 ( ic->acc->prpl->handle_cmp( ic->acc->user, handle ) == 0 );
     87}
     88
    8289void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at )
    8390{
     
    8996       
    9097        /* Gaim sends own messages through this too. IRC doesn't want this, so kill them */
    91         if( g_strcasecmp( who, ic->acc->user ) == 0 )
     98        if( handle_is_self( ic, who ) )
    9299                return;
    93100       
     
    139146        if( who == NULL)
    140147                bu = NULL;
    141         else if( g_strcasecmp( who, ic->acc->user ) == 0 )
     148        else if( handle_is_self( ic, who ) )
    142149                bu = bee->user;
    143150        else
     
    161168                imcb_log( c->ic, "User %s added to conversation %p", handle, c );
    162169       
    163         me = ic->acc->prpl->handle_cmp( handle, ic->acc->user ) == 0;
     170        me = handle_is_self( ic, handle );
    164171       
    165172        /* Most protocols allow people to join, even when they're not in
     
    189196       
    190197        /* It might be yourself! */
    191         if( g_strcasecmp( handle, ic->acc->user ) == 0 )
     198        if( handle_is_self( ic, handle ) )
    192199        {
    193200                if( c->joined == 0 )
Note: See TracChangeset for help on using the changeset viewer.