]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-login.c
Rework check for number of parameters
[ngircd-alex.git] / src / ngircd / irc-login.c
index 88804ef2b8b7dd1f95b71522ebc2ff3b84496827..67a0fbfd803603befe536bc7e61e94eb06ced5a0 100644 (file)
@@ -358,8 +358,6 @@ IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
        assert(Client != NULL);
        assert(Req != NULL);
 
        assert(Client != NULL);
        assert(Req != NULL);
 
-       _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
        /* Search the originator */
        from = Client_Search(Req->prefix);
        if (!from)
        /* Search the originator */
        from = Client_Search(Req->prefix);
        if (!from)
@@ -521,8 +519,6 @@ IRC_SERVICE(CLIENT *Client, REQUEST *Req)
                return IRC_WriteErrClient(Client, ERR_ALREADYREGISTRED_MSG,
                                          Client_ID(Client));
 
                return IRC_WriteErrClient(Client, ERR_ALREADYREGISTRED_MSG,
                                          Client_ID(Client));
 
-       _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 6)
-
        if (Client_Type(Client) != CLIENT_SERVER)
                return IRC_WriteErrClient(Client, ERR_ERRONEUSNICKNAME_MSG,
                                  Client_ID(Client), Req->argv[0]);
        if (Client_Type(Client) != CLIENT_SERVER)
                return IRC_WriteErrClient(Client, ERR_ERRONEUSNICKNAME_MSG,
                                  Client_ID(Client), Req->argv[0]);
@@ -598,8 +594,6 @@ IRC_SERVICE(CLIENT *Client, REQUEST *Req)
 GLOBAL bool
 IRC_WEBIRC(CLIENT *Client, REQUEST *Req)
 {
 GLOBAL bool
 IRC_WEBIRC(CLIENT *Client, REQUEST *Req)
 {
-       _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 4)
-
        if (!Conf_WebircPwd[0] || strcmp(Req->argv[0], Conf_WebircPwd) != 0)
                return IRC_WriteErrClient(Client, ERR_PASSWDMISMATCH_MSG,
                                          Client_ID(Client));
        if (!Conf_WebircPwd[0] || strcmp(Req->argv[0], Conf_WebircPwd) != 0)
                return IRC_WriteErrClient(Client, ERR_PASSWDMISMATCH_MSG,
                                          Client_ID(Client));
@@ -631,8 +625,6 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
        assert(Client != NULL);
        assert(Req != NULL);
 
        assert(Client != NULL);
        assert(Req != NULL);
 
-       _IRC_ARGC_LE_OR_RETURN_(Client, Req, 1)
-
        if (Req->argc == 1)
                strlcpy(quitmsg, Req->argv[0], sizeof quitmsg);
 
        if (Req->argc == 1)
                strlcpy(quitmsg, Req->argv[0], sizeof quitmsg);