aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-04-01 22:54:39 -0400
committerWilmer van der Gaast <wilmer@gaast.net>2010-04-01 22:54:39 -0400
commit231b08b07a2807881da1327408e33855370b7b95 (patch)
tree67aa56a2b8585e2f286eb3eb6a7eeff029de61e1 /irc_im.c
parentfb117aee274bccfb6528288599ef81fe72191e12 (diff)
Show buddy online/offline status in the first channel.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/irc_im.c b/irc_im.c
index 07b478fb..9a4ce176 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -75,6 +75,17 @@ static gboolean bee_irc_user_free( bee_t *bee, bee_user_t *bu )
static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old )
{
+ irc_t *irc = bee->ui_data;
+ irc_channel_t *ic = irc->channels->data; /* For now, just pick the first channel. */
+
+ if( ( bu->flags & BEE_USER_ONLINE ) != ( old->flags & BEE_USER_ONLINE ) )
+ {
+ if( bu->flags & BEE_USER_ONLINE )
+ irc_channel_add_user( ic, (irc_user_t*) bu->ui_data );
+ else
+ irc_channel_del_user( ic, (irc_user_t*) bu->ui_data );
+ }
+
return TRUE;
}