Commits

jdhore  committed 1435b01

Add general::true_no_oper_flood . I'm not going to explain it here.
Ask me what it does on IRC if you're curious.

  • Participants
  • Parent commits b988fd4

Comments (0)

Files changed (7)

File doc/example.conf

 	connect_timeout = 30 seconds;
 	disable_auth = no;
 	no_oper_flood = yes;
+	true_no_oper_flood = no;
 	max_targets = 4;
 	client_flood = 20;
         use_whois_actually = no;

File doc/reference.conf

 	/* no oper flood: increase flood limits for opers. */
 	no_oper_flood = yes;
 
+	/* true no oper flood: Allow opers to NEVER hit flood limits.
+	 * With the above setting, flood limits are set to 4x what they
+	 * are for normal users. With this setting, they're removed entirely.
+	 * ENABLE THIS SETTING WITH CAUTION.
+	 */
+	true_no_oper_flood = no;
+
 	/* REMOVE ME.  The following line checks you've been reading. */
 	havent_read_conf = yes;
 	

File include/s_conf.h

 	int pace_wait_simple;
 	int short_motd;
 	int no_oper_flood;
+	int true_no_oper_flood;
 	int hide_server;
 	int hide_spoof_ips;
 	int hide_error_messages;

File modules/m_info.c

 		"Disable flood control for operators",
 	},
 	{
+		"true_no_oper_flood",
+		OUTPUT_BOOLEAN,
+		&ConfigFileEntry.true_no_oper_flood,
+		"Really disable flood control for opers, not just make it very high",
+	},
+	{
 		"non_redundant_klines",
 		OUTPUT_BOOLEAN,
 		&ConfigFileEntry.non_redundant_klines,

File src/newconf.c

 	{ "min_nonwildcard",	CF_INT,   NULL, 0, &ConfigFileEntry.min_nonwildcard	},
 	{ "nick_delay",		CF_TIME,  NULL, 0, &ConfigFileEntry.nick_delay		},
 	{ "no_oper_flood",	CF_YESNO, NULL, 0, &ConfigFileEntry.no_oper_flood	},
+	{ "true_no_oper_flood", CF_YESNO, NULL, 0, &ConfigFileEntry.true_no_oper_flood  },
 	{ "operspy_admin_only",	CF_YESNO, NULL, 0, &ConfigFileEntry.operspy_admin_only	},
 	{ "operspy_dont_care_user_info", CF_YESNO, NULL, 0, &ConfigFileEntry.operspy_dont_care_user_info },
 	{ "secret_channels_in_whois", CF_YESNO, NULL, 0, &ConfigFileEntry.secret_channels_in_whois },

File src/packet.c

 	{
 
 		if(IsOper(client_p) && ConfigFileEntry.no_oper_flood)
-			checkflood = 0;
+		{
+			if (ConfigFileEntry.true_no_oper_flood)
+				checkflood = -1;
+			else
+				checkflood = 0;
+		}
 		/*
 		 * Handle flood protection here - if we exceed our flood limit on
 		 * messages in this loop, we simply drop out of the loop prematurely.
 			/* allow opers 4 times the amount of messages as users. why 4?
 			 * why not. :) --fl_
 			 */
-			else if(client_p->localClient->sent_parsed >= (4 * client_p->localClient->allow_read))
+			else if(client_p->localClient->sent_parsed >= (4 * client_p->localClient->allow_read) && checkflood != -1)
 				break;
 
 			dolen = rb_linebuf_get(&client_p->localClient->

File src/s_conf.c

 	ConfigFileEntry.pace_wait_simple = 1;
 	ConfigFileEntry.short_motd = NO;
 	ConfigFileEntry.no_oper_flood = NO;
+	ConfigFileEntry.true_no_oper_flood = NO;
 	ConfigFileEntry.fname_userlog = NULL;
 	ConfigFileEntry.fname_fuserlog = NULL;
 	ConfigFileEntry.fname_operlog = NULL;