about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/conn.c11
-rw-r--r--src/ngircd/defines.h4
-rw-r--r--src/ngircd/irc-mode.c1
3 files changed, 13 insertions, 3 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 77c8cd8a..5c175dfd 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1693,7 +1693,12 @@ Handle_Buffer(CONN_ID Idx)
 			maxcmd *= 5;
 		break;
 	    case CLIENT_SERVICE:
-		maxcmd = MAX_COMMANDS_SERVICE; break;
+		maxcmd = MAX_COMMANDS_SERVICE;
+		break;
+	    case CLIENT_USER:
+		if (Client_HasMode(c, 'F'))
+			maxcmd = MAX_COMMANDS_SERVICE;
+		break;
 	}
 
 	for (i=0; i < maxcmd; i++) {
@@ -2427,6 +2432,10 @@ Throttle_Connection(const CONN_ID Idx, CLIENT *Client, const int Reason,
 	    || Client_Type(Client) == CLIENT_SERVICE)
 		return;
 
+	/* Don't throttle clients with user mode 'F' set */
+	if (Client_HasMode(Client, 'F'))
+		return;
+
 	LogDebug("Throttling connection %d: code %d, value %d!", Idx,
 		 Reason, Value);
 	Conn_SetPenalty(Idx, 1);
diff --git a/src/ngircd/defines.h b/src/ngircd/defines.h
index 361564f0..4acdc477 100644
--- a/src/ngircd/defines.h
+++ b/src/ngircd/defines.h
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
+ * Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -173,7 +173,7 @@
 #endif
 
 /** Supported user modes. */
-#define USERMODES "abBcCioqrRswx"
+#define USERMODES "abBcCFioqrRswx"
 
 /** Supported channel modes. */
 #define CHANMODES "abehiIklmMnoOPqQrRstvVz"
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index 6a670079..fe981213 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -222,6 +222,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
 			break;
 		case 'c': /* Receive connect notices */
 		case 'q': /* KICK-protected user */
+		case 'F': /* disable flood protection */
 			  /* (only settable by IRC operators!) */
 			if (!set || Client_Type(Client) == CLIENT_SERVER
 			    || Client_HasMode(Origin, 'o'))