} else if (Client_Type(Client) == CLIENT_UNKNOWN ||
Client_Type(Client) == CLIENT_UNKNOWNSERVER) {
/* Unregistered connection, but wrong number of arguments: */
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
} else {
/* Server or service introduces new client */
/* Bad number of parameters? */
- if (Req->argc != 2 && Req->argc != 7)
+ if (Req->argc != 2 && Req->argc != 7) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
if (Req->argc >= 7) {
/* RFC 2813 compatible syntax */
assert(Client != NULL);
assert(Req != NULL);
- _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
/* Search the originator */
from = Client_Search(Req->prefix);
if (!from)
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]);
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));
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);