Changeset db5ef3a


Ignore:
Timestamp:
2016-02-01T05:10:47Z (3 years ago)
Author:
Shane Synan <digitalcircuit36939@…>
Branches:
master
Children:
4543356c
Parents:
7616eec
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • irc_send.c

    r7616eec rdb5ef3a  
    348348                }
    349349
    350                 /* rfc1459 doesn't mention this: G means gone, H means here */
    351                 status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H';
     350                /* If this is the account nick, check configuration to see if away */
     351                if (iu == irc->user) {
     352                        /* rfc1459 doesn't mention this: G means gone, H means here */
     353                        status_prefix[0] = set_getstr(&irc->b->set, "away") ? 'G' : 'H';
     354                } else {
     355                        status_prefix[0] = iu->flags & IRC_USER_AWAY ? 'G' : 'H';
     356                }
    352357
    353358                irc_send_num(irc, 352, "%s %s %s %s %s %s :0 %s",
Note: See TracChangeset for help on using the changeset viewer.