42wim/matterircd

Direct messages received set wrong user in IRC PRIVMSG

the-real-ed opened this issue · 0 comments

This bug was encountered after particular modules in my ZNC setup (IRC bouncer) stopped working when using matterircd. e.g. ZNC push was no longer pushing when receiving direct messages. The same bug may affect other modules as well (e.g. ZNC watch when highlighting direct messages).

Debugging the issue, we can see that PMs to me are formatted (for IRC consumption) like this:

level=debug msg="-> :buddy!buddy@https://chat.example.com PRIVMSG buddy :hi the-real-ed\n"

However, according to the IRC spec (see below) the message should be formatted with "PRIVMSG [me] :hi the-real-ed\n", i.e.:

:buddy!buddy@https://chat.example.com PRIVMSG the-real-ed :hi the-real-ed\n

IRC spec https://tools.ietf.org/html/rfc1459 4.4.1:

Command: PRIVMSG
Parameters: <receiver>{,<receiver>} <text to be sent>

PRIVMSG is used to send private messages between users. <receiver> is the nickname of the receiver of the message.

Patch coming up...