Module: ngircd.git Branch: master Commit: 0a9608a26f4c5fec7d09f13a814bf4e384b17759 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=0a960...
Author: Alexander Barton alex@barton.de Date: Tue Mar 3 16:33:40 2009 +0100
Channel mode changes: break on error
Don't echo multiple syntax error messages (461) on invalid commands, but break after the first one. In addition, this solves corrupted 'Unknown mode "+' messages.
---
src/ngircd/irc-mode.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 2c14228..9ada4f1 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -440,6 +440,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) ok = IRC_WriteStrClient(Origin, ERR_NEEDMOREPARAMS_MSG, Client_ID(Origin), Req->command); + goto chan_exit; } break; case 'l': /* Member limit */ @@ -475,6 +476,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) ok = IRC_WriteStrClient(Origin, ERR_NEEDMOREPARAMS_MSG, Client_ID(Origin), Req->command); + goto chan_exit; } break; case 'P': /* Persistent channel */ @@ -519,6 +521,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel) ok = IRC_WriteStrClient(Origin, ERR_NEEDMOREPARAMS_MSG, Client_ID(Origin), Req->command); + goto chan_exit; } break; /* --- Channel lists --- */