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.
This commit is contained in:
JD Horelick 2010-03-21 00:14:02 -04:00
parent aa9a8067b1
commit 1cc810d3a7
7 changed files with 24 additions and 2 deletions

View File

@ -550,6 +550,7 @@ general {
connect_timeout = 30 seconds; connect_timeout = 30 seconds;
disable_auth = no; disable_auth = no;
no_oper_flood = yes; no_oper_flood = yes;
true_no_oper_flood = no;
max_targets = 4; max_targets = 4;
client_flood = 20; client_flood = 20;
use_whois_actually = no; use_whois_actually = no;

View File

@ -1284,6 +1284,13 @@ general {
/* no oper flood: increase flood limits for opers. */ /* no oper flood: increase flood limits for opers. */
no_oper_flood = yes; 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. */ /* REMOVE ME. The following line checks you've been reading. */
havent_read_conf = yes; havent_read_conf = yes;

View File

@ -189,6 +189,7 @@ struct config_file_entry
int pace_wait_simple; int pace_wait_simple;
int short_motd; int short_motd;
int no_oper_flood; int no_oper_flood;
int true_no_oper_flood;
int hide_server; int hide_server;
int hide_spoof_ips; int hide_spoof_ips;
int hide_error_messages; int hide_error_messages;

View File

@ -374,6 +374,12 @@ static struct InfoStruct info_table[] = {
&ConfigFileEntry.no_oper_flood, &ConfigFileEntry.no_oper_flood,
"Disable flood control for operators", "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", "non_redundant_klines",
OUTPUT_BOOLEAN, OUTPUT_BOOLEAN,

View File

@ -2226,6 +2226,7 @@ static struct ConfEntry conf_general_table[] =
{ "min_nonwildcard", CF_INT, NULL, 0, &ConfigFileEntry.min_nonwildcard }, { "min_nonwildcard", CF_INT, NULL, 0, &ConfigFileEntry.min_nonwildcard },
{ "nick_delay", CF_TIME, NULL, 0, &ConfigFileEntry.nick_delay }, { "nick_delay", CF_TIME, NULL, 0, &ConfigFileEntry.nick_delay },
{ "no_oper_flood", CF_YESNO, NULL, 0, &ConfigFileEntry.no_oper_flood }, { "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_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 }, { "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 }, { "secret_channels_in_whois", CF_YESNO, NULL, 0, &ConfigFileEntry.secret_channels_in_whois },

View File

@ -99,7 +99,12 @@ parse_client_queued(struct Client *client_p)
{ {
if(IsOper(client_p) && ConfigFileEntry.no_oper_flood) if(IsOper(client_p) && ConfigFileEntry.no_oper_flood)
{
if (ConfigFileEntry.true_no_oper_flood)
checkflood = -1;
else
checkflood = 0; checkflood = 0;
}
/* /*
* Handle flood protection here - if we exceed our flood limit on * Handle flood protection here - if we exceed our flood limit on
* messages in this loop, we simply drop out of the loop prematurely. * messages in this loop, we simply drop out of the loop prematurely.
@ -129,7 +134,7 @@ parse_client_queued(struct Client *client_p)
/* allow opers 4 times the amount of messages as users. why 4? /* allow opers 4 times the amount of messages as users. why 4?
* why not. :) --fl_ * 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; break;
dolen = rb_linebuf_get(&client_p->localClient-> dolen = rb_linebuf_get(&client_p->localClient->

View File

@ -720,6 +720,7 @@ set_default_conf(void)
ConfigFileEntry.pace_wait_simple = 1; ConfigFileEntry.pace_wait_simple = 1;
ConfigFileEntry.short_motd = NO; ConfigFileEntry.short_motd = NO;
ConfigFileEntry.no_oper_flood = NO; ConfigFileEntry.no_oper_flood = NO;
ConfigFileEntry.true_no_oper_flood = NO;
ConfigFileEntry.fname_userlog = NULL; ConfigFileEntry.fname_userlog = NULL;
ConfigFileEntry.fname_fuserlog = NULL; ConfigFileEntry.fname_fuserlog = NULL;
ConfigFileEntry.fname_operlog = NULL; ConfigFileEntry.fname_operlog = NULL;