diff options
author | Shane Synan <digitalcircuit36939@gmail.com> | 2016-01-31 23:10:47 -0600 |
---|---|---|
committer | Shane Synan <digitalcircuit36939@gmail.com> | 2016-01-31 23:10:47 -0600 |
commit | db5ef3a204c3a518adb7cedde0ffb067d6336add (patch) | |
tree | a5b548b07177ac4f4e9c30797e858e43a2f000b4 /irc_send.c | |
parent | 7616eec826025932d1a2a62fc6f71887995046e0 (diff) |
Check global account away setting in WHO replies
When sending WHO reply, check if irc_user is the account user and if
so set away status according to global account away configuration.
Otherwise, reply according to irc_user flags. Fixes global away
status not being shown in IRC clients when WHO polling is enabled.
Fixes: https://bugs.bitlbee.org/ticket/1247
Diffstat (limited to 'irc_send.c')
-rw-r--r-- | irc_send.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -347,8 +347,13 @@ void irc_send_who(irc_t *irc, GSList *l, const char *channel) iu = l->data; } - /* rfc1459 doesn't mention this: G means gone, H means here */ - status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; + /* If this is the account nick, check configuration to see if away */ + if (iu == irc->user) { + /* rfc1459 doesn't mention this: G means gone, H means here */ + status_prefix[0] = set_getstr(&irc->b->set, "away") ? 'G' : 'H'; + } else { + status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H'; + } irc_send_num(irc, 352, "%s %s %s %s %s %s :0 %s", is_channel ? channel : "*", iu->user, iu->host, irc->root->host, |