]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-info.c
Correct numeric returned by whois
[ngircd-alex.git] / src / ngircd / irc-info.c
index 3d77237f4e08f95928d826462734dafc3f19e759..6013fa0c1bff4a6640a096a7fbb729c16fcbb335 100644 (file)
@@ -1211,11 +1211,12 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
 
        IRC_SetPenalty(Client, 1);
 
-       /* Bad number of parameters? */
-       if (Req->argc < 1 || Req->argc > 2)
-               return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
-                                         Client_ID(Client), Req->command);
+       /* Wrong number of parameters? */
+       if (Req->argc < 1)
+               return IRC_WriteErrClient(Client, ERR_NONICKNAMEGIVEN_MSG,
+                                         Client_ID(Client));
 
+       _IRC_ARGC_LE_OR_RETURN_(Client, Req, 2)
        _IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
 
        /* Get target server for this command */