summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@lodoss.net>2013-11-07 18:17:58 +0000
committerFederico G. Schwindt <fgsch@lodoss.net>2013-11-07 18:17:58 +0000
commit9ee3760493a8c64f7d84ffb69c0b04a3e1a8a1c0 (patch)
tree97b3308313e4deb6795ce46f8015fb695efb2fa2 /src
parent344185b1bd6254ac4a198b3caeaf08db285016c8 (diff)
downloadngircd-9ee3760493a8c64f7d84ffb69c0b04a3e1a8a1c0.tar.gz
ngircd-9ee3760493a8c64f7d84ffb69c0b04a3e1a8a1c0.zip
Add comments around some IRC_SetPenalty() calls
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/irc-info.c3
-rw-r--r--src/ngircd/irc-oper.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index f1d02711..56cae2ac 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -189,7 +189,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
 		}
 	}
 
-	/* If there are a lot of clients, augment penalty a bit */
+	/* If there are a lot of clients, increase the penalty a bit */
 	if (count > MAX_RPL_WHO)
 		IRC_SetPenalty(Client, 1);
 
@@ -1233,6 +1233,7 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
 			continue;
 		}
 		got_wildcard = true;
+		/* Increase penalty for wildcard queries */
 		IRC_SetPenalty(Client, 3);
 
 		for (c = Client_First(); c; c = Client_Next(c)) {
diff --git a/src/ngircd/irc-oper.c b/src/ngircd/irc-oper.c
index 0b50bca6..ab4023ac 100644
--- a/src/ngircd/irc-oper.c
+++ b/src/ngircd/irc-oper.c
@@ -50,6 +50,7 @@ Bad_OperPass(CLIENT *Client, char *errtoken, char *errmsg)
 {
 	Log(LOG_WARNING, "Got invalid OPER from \"%s\": \"%s\" -- %s",
 	    Client_Mask(Client), errtoken, errmsg);
+	/* Increase penalty to slow down possible brute force attacks */
 	IRC_SetPenalty(Client, 10);
 	return IRC_WriteStrClient(Client, ERR_PASSWDMISMATCH_MSG,
 				  Client_ID(Client));