Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct messages received set wrong user in IRC PRIVMSG #406

Closed
the-real-ed opened this issue Mar 2, 2021 · 0 comments · Fixed by #407
Closed

Direct messages received set wrong user in IRC PRIVMSG #406

the-real-ed opened this issue Mar 2, 2021 · 0 comments · Fixed by #407

Comments

@the-real-ed
Copy link
Contributor

the-real-ed commented Mar 2, 2021

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...

the-real-ed added a commit to the-real-ed/matterircd that referenced this issue Mar 2, 2021
Currently the code creates the following IRC raw message (direct
message sent from "buddy", to "me"):
:buddy!buddy@https://chat.example.com PRIVMSG buddy :hi

However, according to the IRC spec rfc1459 4.4.1
(https://tools.ietf.org/html/rfc1459), direct messages should have my
username set as the receiver.

i.e.
:buddy!buddy@https://chat.example.com PRIVMSG me :hi

Fixes: 42wim#406
@42wim 42wim closed this as completed in #407 Mar 6, 2021
42wim pushed a commit that referenced this issue Mar 6, 2021
Currently the code creates the following IRC raw message (direct
message sent from "buddy", to "me"):
:buddy!buddy@https://chat.example.com PRIVMSG buddy :hi

However, according to the IRC spec rfc1459 4.4.1
(https://tools.ietf.org/html/rfc1459), direct messages should have my
username set as the receiver.

i.e.
:buddy!buddy@https://chat.example.com PRIVMSG me :hi

Fixes: #406

Co-authored-by: Edin Sarajlic <edin@saronline.net>
hloeung added a commit to hloeung/matterircd that referenced this issue Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant