X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-oper.c;h=4d17085f4ac3ce7a264bfa900e940d17512f5c5c;hp=40633177a51babbe3d8971453f9b62818bec8a50;hb=bcb45da1b416e7ee4b50dcf16947fb9703f713cf;hpb=08f9d31d60220e8a389a2d24f42625be7749f090 diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c index 40633177..4d17085f 100644 --- a/src/ngircd/irc-oper.c +++ b/src/ngircd/irc-oper.c @@ -208,14 +208,18 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req) /* 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')) @@ -391,9 +395,11 @@ IRC_xLINE(CLIENT *Client, REQUEST *Req) 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)