commit - f494023b0d99be0e4b07701b983b71ecf4920465
commit + 3bd973037a1664387161a465f801b78ff0180fa1
blob - 27e11c4032c96eeabc8adcf2461e1acc48dec639
blob + cfb94f60926f08b3dd9410e0d1f265958a52c9a9
--- 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_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
} else {
/* Registered connection, PASS command is not allowed! */
+ IRC_SetPenalty(Client, 2);
return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
Client_ID(Client));
}
Req->argv[0] );
} else {
/* Is this a restricted client? */
- if( Client_HasMode( Client, 'r' ))
+ if (Client_HasMode(Client, 'r')) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteStrClient( Client,
ERR_RESTRICTED_MSG,
Client_ID( Client ));
-
+ }
target = Client;
}
return CONNECTED;
} else if (Client_Type(Client) == CLIENT_USER) {
/* Already registered connection */
+ IRC_SetPenalty(Client, 2);
return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
Client_ID(Client));
} else {
/* Unexpected/invalid connection state? */
+ IRC_SetPenalty(Client, 2);
return IRC_WriteStrClient(Client, ERR_NOTREGISTERED_MSG,
Client_ID(Client));
}
assert(Req != NULL);
if (Client_Type(Client) != CLIENT_GOTPASS &&
- Client_Type(Client) != CLIENT_SERVER)
+ Client_Type(Client) != CLIENT_SERVER) {
+ IRC_SetPenalty(Client, 2);
return IRC_WriteStrClient(Client, ERR_ALREADYREGISTRED_MSG,
Client_ID(Client));
+ }
_IRC_ARGC_EQ_OR_RETURN_(Client, Req, 6)