]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc.c
TRACE: fix error message when there are too many parameters
[ngircd-alex.git] / src / ngircd / irc.c
index 968bcea6e58998a7d4d56096f727fa887bc7b37a..8c08cdc1a744fc939d183d2fa16a5c657b788ed8 100644 (file)
@@ -138,8 +138,6 @@ IRC_KILL(CLIENT *Client, REQUEST *Req)
                return IRC_WriteErrClient(Client, ERR_NOPRIVILEGES_MSG,
                                          Client_ID(Client));
 
-       _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
        /* Get prefix (origin); use the client if no prefix is given. */
        if (Req->prefix)
                prefix = Client_Search(Req->prefix);
@@ -280,11 +278,6 @@ IRC_TRACE(CLIENT *Client, REQUEST *Req)
 
        IRC_SetPenalty(Client, 3);
 
-       /* Bad number of arguments? */
-       if (Req->argc > 1)
-               return IRC_WriteErrClient(Client, ERR_NORECIPIENT_MSG,
-                                         Client_ID(Client), Req->command);
-
        _IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
        _IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, from)
 
@@ -362,8 +355,6 @@ IRC_HELP(CLIENT *Client, REQUEST *Req)
 
        IRC_SetPenalty(Client, 2);
 
-       _IRC_ARGC_LE_OR_RETURN_(Client, Req, 1)
-
        if ((Req->argc == 0 && array_bytes(&Conf_Helptext) > 0)
            || (Req->argc >= 1 && strcasecmp(Req->argv[0], "Commands") != 0)) {
                /* Help text available and requested */
@@ -514,6 +505,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
        if (Req->argc > 2) {
                if (!SendErrors)
                        return CONNECTED;
+               IRC_SetPenalty(Client, 2);
                return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
                                          Client_ID(Client), Req->command);
        }