#1247 closed defect (fixed)
Bitlbee WHO doesn't report account away status, breaks Quassel away-on-detach
Reported by: | digitalcircuit | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | IRC | Version: | 3.4.1 |
Keywords: | Cc: | ||
IRC client+version: | Client-independent | Operating System: | Linux |
OS version/distro: | Ubuntu 16.04 LTS |
Description
When sending WHO replies Bitlbee does not check the away settings for the local IRC user. If I set myself as /away, any future replies will wrongly tell the IRC client that I'm not away. See irc_send_who
in irc_send.c, line 306
This breaks Quassel IRC's "auto-away on detach" functionality. The Quassel core (bouncer) sets /away when the client disconnects, but whenever a WHO reply is received indicating the account nick is no longer away (H
instead of G
), the core assumes Bitlbee cleared the away status. As a result, the Quassel core won't send the appropriate AWAY\r\n
upon reattaching the client. See Quassel coresessioneventprocessor.cpp, line 766
Perhaps use a form of set_getstr(&irc->b->set, "away", away)
to check what's set by irc_cmd_away
in irc_commands.c, line 731?
strace output of Bitlbee (strace -e write,read -p $BITLBEE_PID -t -s 400
):
16:12:36 read(11, "AWAY :I'm here, just testing Bitlbee\r\n", 512) = 38 16:12:36 write(11, ":localhost 306 digitalcircuit :You're now away: I'm here, just testing Bitlbee\r\n", 76) = 76 16:13:30 read(11, "WHO &bitlbee\r\n", 512) = 33 16:13:30 write(11, ":localhost 352 digitalcircuit &bitlbee quassel localhost localhost digitalcircuit H :0 Digital\r\n:localhost 352 digitalcircuit &bitlbee root localhost localhost root H :0 User manager\r\n:localhost 315 digitalcircuit &bitlbee :End of /WHO list\r\n", 454) = 454
expected reply (G
not H
):
16:13:30 write(11, ":localhost 352 digitalcircuit &bitlbee quassel localhost localhost digitalcircuit G :0 Digital\r\n:localhost 352 digitalcircuit &bitlbee root localhost localhost root H :0 User manager\r\n:localhost 315 digitalcircuit &bitlbee :End of /WHO list\r\n", 454) = 454
Attachments (0)
Change History (4)
comment:1 Changed at 2016-01-31T23:45:16Z by
comment:2 Changed at 2016-02-01T00:21:28Z by
Ack, my bad - I was using 3.4.1, but referencing the source code from git master.
As requested on IRC, I retested with the latest git master nightly Ubuntu package (2015-12-6, for some reason nothing later is available), and the issue persists.
comment:3 Changed at 2016-02-01T05:26:37Z by
I think I've found and fixed the problem, so I've put up a pull request on Github. If there's anything amiss, I'll try to amend it.
comment:4 Changed at 2016-02-02T17:15:54Z by
Resolution: | → fixed |
---|---|
Status: | new → closed |
That was merged and this is fixed.
Are you using 3.4.1 as you indicated in the version field, or git master? Because the line you highlighted there wasn't in 3.4.1.