mirror of
https://github.com/osmarks/ngircd.git
synced 2025-01-31 09:44:44 +00:00
Correct numeric returned by whois
As per RFC whois should return 431 if no nick is provided. While here convert upper check to use irc-macros. As a bonus we get to set the penalty for free.
This commit is contained in:
parent
9f74c0ff07
commit
a98bbc8e0b
@ -1211,11 +1211,12 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
|
|||||||
|
|
||||||
IRC_SetPenalty(Client, 1);
|
IRC_SetPenalty(Client, 1);
|
||||||
|
|
||||||
/* Bad number of parameters? */
|
/* Wrong number of parameters? */
|
||||||
if (Req->argc < 1 || Req->argc > 2)
|
if (Req->argc < 1)
|
||||||
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
return IRC_WriteErrClient(Client, ERR_NONICKNAMEGIVEN_MSG,
|
||||||
Client_ID(Client), Req->command);
|
Client_ID(Client));
|
||||||
|
|
||||||
|
_IRC_ARGC_LE_OR_RETURN_(Client, Req, 2)
|
||||||
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
|
||||||
|
|
||||||
/* Get target server for this command */
|
/* Get target server for this command */
|
||||||
|
Loading…
Reference in New Issue
Block a user