mcpcpc / kirc

A tiny IRC client written in POSIX C99.

Home Page:https://mcpcpc.github.io/kirc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DMs are broken if user changes nick

kdkasad opened this issue · comments

If the user changes their nick using the /NICK command, the nick variable never gets updated. But kirc uses this nick value to check if a message was a message sent directly to the user's nick.

To reproduce:

  1. Log on to an IRC server
  2. Send yourself a DM (@<nick> test message). This should work as expected.
  3. Change your nick (/NICK <nick2>)
  4. Send yourself a DM to this new nick (@<nick2> test message).

The message from step 4 will not be highlighted in cyan as a DM should be. Instead, it'll have your nick (i.e. <nick2>) in brackets as if it was a channel name.