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.
This commit is contained in:
Alexander Barton 2009-03-03 16:33:40 +01:00
parent dee89c2355
commit 0a9608a26f
1 changed files with 3 additions and 0 deletions

View File

@ -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 --- */