aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-08-14 11:55:20 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-08-14 11:55:20 +0100
commitac2717b6a60900d31236b7696f150d0120bda3da (patch)
treeaea6f42167d75c9c41116491cbdb09cc9fbec735 /irc_im.c
parent4ffd757724a657d2dc5c536473523a86f2331d9e (diff)
blist should only show contacts that are (or would be if they were online)
in the current channel.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/irc_im.c b/irc_im.c
index 2d4e8787..7ed2922e 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -140,9 +140,7 @@ static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old
void bee_irc_channel_update( irc_t *irc, irc_channel_t *ic, irc_user_t *iu )
{
- struct irc_control_channel *icc;
GSList *l;
- gboolean match = FALSE;
if( ic == NULL )
{
@@ -167,23 +165,13 @@ void bee_irc_channel_update( irc_t *irc, irc_channel_t *ic, irc_user_t *iu )
return;
}
- icc = ic->data;
-
- if( icc->type == IRC_CC_TYPE_DEFAULT )
- match = TRUE;
- else if( icc->type == IRC_CC_TYPE_GROUP )
- match = iu->bu->group == icc->group;
- else if( icc->type == IRC_CC_TYPE_ACCOUNT )
- match = iu->bu->ic->acc == icc->account;
- else if( icc->type == IRC_CC_TYPE_PROTOCOL )
- match = iu->bu->ic->acc->prpl == icc->protocol;
-
- if( !match )
+ if( !irc_channel_wants_user( ic, iu ) )
{
irc_channel_del_user( ic, iu, IRC_CDU_PART, NULL );
}
else
{
+ struct irc_control_channel *icc = ic->data;
int mode = 0;
if( !( iu->bu->flags & BEE_USER_ONLINE ) )