commit - 08f9d31d60220e8a389a2d24f42625be7749f090
commit + bcb45da1b416e7ee4b50dcf16947fb9703f713cf
blob - ce042043ebe0b3eedc087635e50fc30a6b51610c
blob + d5e7bdd1b474a1882c0cca04048a624c17032ac3
--- src/ngircd/irc-channel.c
+++ src/ngircd/irc-channel.c
channame = strtok_r(channame, ",", &lastchan);
/* Make sure that "channame" is not the empty string ("JOIN :") */
- if (! channame)
+ if (!channame) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
while (channame) {
flags = NULL;
chan = strtok(Req->argv[0], ",");
/* Make sure that "chan" is not the empty string ("PART :") */
- if (! chan)
+ if (!chan) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
while (chan) {
Channel_Part(target, Client, chan,
assert( Req != NULL );
/* Bad number of parameters? */
- if (Req->argc < 2 || Req->argc == 4 || Req->argc > 5)
+ if (Req->argc < 2 || Req->argc == 4 || Req->argc > 5) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
/* Compatibility kludge */
if (Req->argc == 5)
blob - 88455c74d9e85c770442aea1aa6f0c54e2e0ab9c
blob + 1c250a442bc8143dab65692fba4a4f26ce913d8c
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
if (strcmp(Req->argv[1], "o") == 0)
only_ops = true;
#ifdef STRICT_RFC
- else
+ else {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client),
Req->command);
+ }
#endif
}
blob - 67a0fbfd803603befe536bc7e61e94eb06ced5a0
blob + 013481d2275029b664019126a6926d3e978dc222
--- src/ngircd/irc-login.c
+++ src/ngircd/irc-login.c
} 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 */
blob - 38fec0d028b5761bcf2bd432a2633cae9871f7fc
blob + e2fa59a2df67aa5f306629e0b3db9030a26d7c1d
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
#ifdef STRICT_RFC
/* Only send error message in "strict" mode,
* this is how ircd2.11 and others behave ... */
+ IRC_SetPenalty(Origin, 2);
connected = IRC_WriteErrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
#ifdef STRICT_RFC
/* Only send error message in "strict" mode,
* this is how ircd2.11 and others behave ... */
+ IRC_SetPenalty(Origin, 2);
connected = IRC_WriteErrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
* mode, because most other servers don't do
* it as well and some clients send "wired"
* MODE commands like "MODE #chan -ooo nick". */
+ IRC_SetPenalty(Origin, 2);
connected = IRC_WriteErrClient(Origin,
ERR_NEEDMOREPARAMS_MSG,
Client_ID(Origin), Req->command);
blob - 23db579e725e1e54ef01faf4bfdd10616843ac76
blob + 52126877dc1a6f27bc804b3a968499251d36e980
--- src/ngircd/irc-op.c
+++ src/ngircd/irc-op.c
nickCount--;
}
} else {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
}
blob - 40633177a51babbe3d8971453f9b62818bec8a50
blob + 4d17085f4ac3ce7a264bfa900e940d17512f5c5c
--- src/ngircd/irc-oper.c
+++ src/ngircd/irc-oper.c
/* Bad number of parameters? */
if (Req->argc != 1 && Req->argc != 2 && Req->argc != 3 &&
- Req->argc != 5 && Req->argc != 6)
+ Req->argc != 5 && Req->argc != 6) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
/* Invalid port number? */
- if ((Req->argc > 1) && atoi(Req->argv[1]) < 1)
+ if ((Req->argc > 1) && atoi(Req->argv[1]) < 1) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
if (Client_Type(Client) != CLIENT_SERVER
&& !Client_HasMode(Client, 'o'))
assert(Req != NULL);
/* Bad number of parameters? */
- if (Req->argc != 1 && Req->argc != 3)
+ if (Req->argc != 1 && Req->argc != 3) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
from = Op_Check(Client, Req);
if (!from)
blob - 80bb6a6141169fe0b03b18063496a2b9d0494800
blob + 030c3cd1fc043c00f3c99633eb1e33620b2be838
--- src/ngircd/irc-server.c
+++ src/ngircd/irc-server.c
LogDebug("Connection %d: got SERVER command (new server link) ...",
Client_Conn(Client));
- if (Req->argc != 2 && Req->argc != 3)
+ if (Req->argc != 2 && Req->argc != 3) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client),
Req->command);
+ }
/* Get configuration index of new remote server ... */
for (i = 0; i < MAX_SERVERS; i++)
{
/* New server is being introduced to the network */
- if (Req->argc != 4)
+ if (Req->argc != 4) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
/* check for existing server with same ID */
if (!Client_CheckID(Client, Req->argv[0]))
Client_MyToken(c), Client_Info(c));
return CONNECTED;
- } else
+ } else {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
+ }
} /* IRC_SERVER */
/*
blob - 7dafaf0539b005bdf808dcefb870838dfae8dfcc
blob + d41439edaa61dbc941fcd12b05c2c29000831536
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
if (Req->argc > 2) {
if (!SendErrors)
return CONNECTED;
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
}