aboutsummaryrefslogtreecommitdiffstats
path: root/irc_im.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-05-04 09:45:10 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-05-04 09:45:10 +0100
commiteb504957c2ffa1a3130951d5381672fb3ef9dfd9 (patch)
tree25f88e020a30b762d70c8c88b00a39a2342786ed /irc_im.c
parent9893da32ab881e135748295fc5c48aada552098b (diff)
Show offline/away status better in /WHO and /WHOIS.
Diffstat (limited to 'irc_im.c')
-rw-r--r--irc_im.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/irc_im.c b/irc_im.c
index 00ea3cd7..fe7287b5 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -82,6 +82,12 @@ static gboolean bee_irc_user_status( bee_t *bee, bee_user_t *bu, bee_user_t *old
irc_user_t *iu = bu->ui_data;
irc_channel_t *ic = irc->channels->data; /* For now, just pick the first channel. */
+ /* Do this outside the if below since away state can change without
+ the online state changing. */
+ iu->flags &= ~IRC_USER_AWAY;
+ if( bu->flags & BEE_USER_AWAY || !( bu->flags & BEE_USER_ONLINE ) )
+ iu->flags |= IRC_USER_AWAY;
+
if( ( bu->flags & BEE_USER_ONLINE ) != ( old->flags & BEE_USER_ONLINE ) )
{
if( bu->flags & BEE_USER_ONLINE )