repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 925b4de2981b55a279f28368446f0a862c621d5e:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 925b4de2981b55a279f28368446f0a862c621d5e
Author: Federico G. Schwindt 
Date:   Wed Nov 6 21:46:53 2013 +0000

    On bad /oper set the penalty to 10 seconds

    This helps against brute-force attempts.

diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c
index 260346c7ce6aec547731b8a0b36440f004270e8d..
index ..0b50bca659e40c3f89ed217c00d0ccf1de060be1 100644
--- a/src/ngircd/irc-oper.c
+++ b/src/ngircd/irc-oper.c
@@ -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 */

-----END OF PAGE-----