miniircd icon indicating copy to clipboard operation
miniircd copied to clipboard

Server does not return client nickname in ERR_NOTONCHANNEL for MODE reply

Open Aphain opened this issue 2 years ago • 0 comments

As described above the server does not return the client nickname as part of its error reply ERR_NOTONCHANNEL in the mode_handler() function. This issue appears at two positions in the function.

This violates RFC2812, which states:

"The most common reply is the numeric reply, used for both errors and normal replies. The numeric reply MUST be sent as one message consisting of the sender prefix, the three-digit numeric, and the target of the reply." - RFC2812, p.8

A short fix would be to change the reply to:

self.reply(b"442 %s %s :You're not on that channel" % (self.nickname, targetname))

Aphain avatar Oct 17 '23 07:10 Aphain