Changeset ac2717b for irc_channel.c


Ignore:
Timestamp:
2010-08-14T10:55:20Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
136c2bb
Parents:
4ffd757
Message:

blist should only show contacts that are (or would be if they were online)
in the current channel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_channel.c

    r4ffd757 rac2717b  
    726726}
    727727
     728/* Figure out if a channel is supposed to have the user, assuming s/he is
     729   online or otherwise also selected by the show_users setting. Only works
     730   for control channels, but does *not* check if this channel is of that
     731   type. Beware! */
     732gboolean irc_channel_wants_user( irc_channel_t *ic, irc_user_t *iu )
     733{
     734        struct irc_control_channel *icc = ic->data;
     735       
     736        if( iu->bu == NULL )
     737                return FALSE;
     738       
     739        switch( icc->type )
     740        {
     741        case IRC_CC_TYPE_GROUP:
     742                return iu->bu->group == icc->group;
     743        case IRC_CC_TYPE_ACCOUNT:
     744                return iu->bu->ic->acc == icc->account;
     745        case IRC_CC_TYPE_PROTOCOL:
     746                return iu->bu->ic->acc->prpl == icc->protocol;
     747        case IRC_CC_TYPE_DEFAULT:
     748        default:
     749                return TRUE;
     750        }
     751}
     752
    728753static gboolean control_channel_free( irc_channel_t *ic )
    729754{
Note: See TracChangeset for help on using the changeset viewer.