Changeset 0b5cc72 for irc_channel.c


Ignore:
Timestamp:
2010-04-05T00:39:04Z (15 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
57c96f7
Parents:
1d39159
Message:

Send nickname change notifications when necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    r1d39159 r0b5cc72  
    8282int irc_channel_add_user( irc_channel_t *ic, irc_user_t *iu )
    8383{
    84         if( g_slist_find( ic->users, iu ) != NULL )
     84        if( !irc_channel_has_user( ic, iu ) )
    8585                return 0;
    8686       
     
    9898int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu )
    9999{
    100         if( g_slist_find( ic->users, iu ) == NULL )
     100        if( !irc_channel_has_user( ic, iu ) )
    101101                return 0;
    102102       
     
    110110       
    111111        return 1;
     112}
     113
     114/* Currently a fairly stupid one-liner but I fear it's going to get worse. :-) */
     115gboolean irc_channel_has_user( irc_channel_t *ic, irc_user_t *iu )
     116{
     117        return g_slist_find( ic->users, iu ) != NULL;
    112118}
    113119
Note: See TracChangeset for help on using the changeset viewer.