From 2f8877ded4f0831a2f6033c589fcd36d9cecd0ba Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 9 Jan 2012 23:18:39 +0100 Subject: [PATCH] Return ERR_UNKNOWNMODE(472) for unknown channel modes The daemon reported ERR_UMODEUNKNOWNFLAG(501), which is wrong. --- src/ngircd/irc-mode.c | 6 +++--- src/ngircd/messages.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 0c63e727..383c4dee 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -673,9 +673,9 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) set ? '+' : '-', *mode_ptr, Client_ID(Origin), Channel_Name(Channel)); connected = IRC_WriteStrClient(Origin, - ERR_UMODEUNKNOWNFLAG2_MSG, - Client_ID(Origin), - set ? '+' : '-', *mode_ptr); + ERR_UNKNOWNMODE_MSG, + Client_ID(Origin), *mode_ptr, + Channel_Name(Channel)); x[0] = '\0'; } else { Log(LOG_DEBUG, diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h index f06cf86b..761e36df 100644 --- a/src/ngircd/messages.h +++ b/src/ngircd/messages.h @@ -122,7 +122,7 @@ #define ERR_SECURECHANNEL_MSG "471 %s %s :Cannot join channel (+z)" #define ERR_OPONLYCHANNEL_MSG "471 %s %s :Cannot join channel (+O)" #define ERR_REGONLYCHANNEL_MSG "471 %s %s :Cannot join channel (+R)" -#define ERR_UNKNOWNMODE_MSG "472 %s: %c :is unknown mode char for %s" +#define ERR_UNKNOWNMODE_MSG "472 %s %c :is unknown mode char for %s" #define ERR_INVITEONLYCHAN_MSG "473 %s %s :Cannot join channel (+i)" #define ERR_BANNEDFROMCHAN_MSG "474 %s %s :Cannot join channel (+b)" #define ERR_BADCHANNELKEY_MSG "475 %s %s :Cannot join channel (+k)"