]> arthur.barton.de Git - ngircd-alex.git/commitdiff
On bad /oper set the penalty to 10 seconds
authorFederico G. Schwindt <fgsch@lodoss.net>
Wed, 6 Nov 2013 21:46:53 +0000 (21:46 +0000)
committerFederico G. Schwindt <fgsch@lodoss.net>
Wed, 6 Nov 2013 21:46:53 +0000 (21:46 +0000)
This helps against brute-force attempts.

src/ngircd/irc-oper.c

index 260346c7ce6aec547731b8a0b36440f004270e8d..0b50bca659e40c3f89ed217c00d0ccf1de060be1 100644 (file)
@@ -50,7 +50,8 @@ Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
 {
        Log(LOG_WARNING, "Got invalid OPER from \"%s\": \"%s\" -- %s",
            Client_Mask(Client), errtoken, errmsg);
-       return IRC_WriteErrClient(Client, ERR_PASSWDMISMATCH_MSG,
+       IRC_SetPenalty(Client, 10);
+       return IRC_WriteStrClient(Client, ERR_PASSWDMISMATCH_MSG,
                                  Client_ID(Client));
 } /* Bad_OperPass */