]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/parse.c
When sending an error use the IRC_WriteErrClient() variant
[ngircd-alex.git] / src / ngircd / parse.c
index 2c7ba94d5a1e793cf37b25d8c25f3e36185c96d4..52954402d9d036acc898f9a1737d9cc5c2acf691 100644 (file)
@@ -531,11 +531,9 @@ Handle_Request( CONN_ID Idx, REQUEST *Req )
                }
 
                if (Req->argc < cmd->min_argc ||
-                   (cmd->max_argc != -1 && Req->argc > cmd->max_argc)) {
-                       IRC_SetPenalty(client, 2);
-                       return IRC_WriteStrClient(client, ERR_NEEDMOREPARAMS_MSG,
+                   (cmd->max_argc != -1 && Req->argc > cmd->max_argc))
+                       return IRC_WriteErrClient(client, ERR_NEEDMOREPARAMS_MSG,
                                                  Client_ID(client), Req->command);
-               }
 
                /* Command is allowed for this client: call it and count
                 * generated bytes in output */