From a067771fa1799e689653931f6743b3502182b850 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 9 May 2010 23:08:30 +0100 Subject: Per-account channels also exist now. --- irc.h | 1 + irc_channel.c | 2 ++ irc_im.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/irc.h b/irc.h index ed9a7c3a..eeb9b1b2 100644 --- a/irc.h +++ b/irc.h @@ -191,6 +191,7 @@ struct irc_control_channel { irc_control_channel_type_t type; struct bee_group *group; + struct account *account; }; extern const struct bee_ui_funcs irc_ui_funcs; diff --git a/irc_channel.c b/irc_channel.c index 159c16dc..f000a997 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -264,6 +264,8 @@ static gboolean control_channel_init( irc_channel_t *ic ) if( ( icc->group = bee_group_by_name( ic->irc->b, ic->name + 1, FALSE ) ) ) icc->type = IRC_CC_TYPE_GROUP; + else if( ( icc->account = account_get( ic->irc->b, ic->name + 1 ) ) ) + icc->type = IRC_CC_TYPE_ACCOUNT; bee_irc_channel_update( ic->irc, ic, NULL ); diff --git a/irc_im.c b/irc_im.c index 8ed9b143..72dc2cc9 100644 --- a/irc_im.c +++ b/irc_im.c @@ -144,6 +144,8 @@ void bee_irc_channel_update( irc_t *irc, irc_channel_t *ic, irc_user_t *iu ) show = TRUE; else if( icc->type == IRC_CC_TYPE_GROUP ) show = iu->bu->group == icc->group; + else if( icc->type == IRC_CC_TYPE_ACCOUNT ) + show = iu->bu->ic->acc == icc->account; if( !show ) { -- cgit v1.2.3