Changeset 6a9d068 for irc_channel.c


Ignore:
Timestamp:
2010-05-03T00:39:39Z (10 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
f924563
Parents:
e54112f
Message:

Restore away_devoice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    re54112f r6a9d068  
    4343       
    4444        irc_channel_add_user( ic, irc->root );
     45        if( strcmp( set_getstr( &irc->b->set, "ops" ), "both" ) == 0 ||
     46            strcmp( set_getstr( &irc->b->set, "ops" ), "root" ) == 0 )
     47                irc_channel_user_set_mode( ic, irc->root, IRC_CHANNEL_USER_OP );
    4548       
    4649        irc->channels = g_slist_prepend( irc->channels, ic );
     
    157160       
    158161        return 1;
     162}
     163
     164void irc_channel_user_set_mode( irc_channel_t *ic, irc_user_t *iu, irc_channel_user_flags_t flags )
     165{
     166        irc_channel_user_t *icu = irc_channel_has_user( ic, iu );
     167       
     168        if( icu->flags == flags )
     169                return;
     170       
     171        if( ic->flags & IRC_CHANNEL_JOINED )
     172                irc_send_channel_user_mode_diff( ic, iu, icu->flags, flags );
     173       
     174        icu->flags = flags;
    159175}
    160176
Note: See TracChangeset for help on using the changeset viewer.