Add option general::use_propagated_bans to allow disabling new KLINE.

If this option is yes (default), KLINE by itself sets global (propagated) bans.
If this option is no, KLINE by itself sets a local kline following cluster{},
compatible with 3.2 and older versions.
This commit is contained in:
Jilles Tjoelker 2010-03-14 17:21:20 +01:00
parent f02f338b31
commit 1702b69419
7 changed files with 18 additions and 1 deletions

View file

@ -457,6 +457,7 @@ general {
identify_command = "IDENTIFY"; identify_command = "IDENTIFY";
non_redundant_klines = yes; non_redundant_klines = yes;
warn_no_nline = yes; warn_no_nline = yes;
use_propagated_bans = yes;
stats_e_disabled = no; stats_e_disabled = no;
stats_c_oper_only=no; stats_c_oper_only=no;
stats_h_oper_only=no; stats_h_oper_only=no;

View file

@ -1030,6 +1030,13 @@ general {
*/ */
warn_no_nline = yes; warn_no_nline = yes;
/* use propagated bans: KLINE sets fully propagated bans. That means
* the klines are part of the netburst and restarted/split servers
* will get them, but they will not apply to 3.2 and older servers
* at all.
*/
use_propagated_bans = yes;
/* stats e disabled: disable stats e. useful if server ips are /* stats e disabled: disable stats e. useful if server ips are
* exempted and you dont want them listing on irc. * exempted and you dont want them listing on irc.
*/ */

View file

@ -223,6 +223,7 @@ struct config_file_entry
int default_umodes; int default_umodes;
int global_snotices; int global_snotices;
int operspy_dont_care_user_info; int operspy_dont_care_user_info;
int use_propagated_bans;
}; };
struct config_channel_entry struct config_channel_entry

View file

@ -482,6 +482,12 @@ static struct InfoStruct info_table[] = {
&ConfigFileEntry.warn_no_nline, &ConfigFileEntry.warn_no_nline,
"Display warning if connecting server lacks N-line" "Display warning if connecting server lacks N-line"
}, },
{
"use_propagated_bans",
OUTPUT_BOOLEAN,
&ConfigFileEntry.use_propagated_bans,
"KLINE sets fully propagated bans"
},
{ {
"default_split_server_count", "default_split_server_count",
OUTPUT_DECIMAL, OUTPUT_DECIMAL,

View file

@ -107,7 +107,7 @@ mo_kline(struct Client *client_p, struct Client *source_p, int parc, const char
struct ConfItem *aconf; struct ConfItem *aconf;
int tkline_time = 0; int tkline_time = 0;
int loc = 1; int loc = 1;
int propagated = 1; int propagated = ConfigFileEntry.use_propagated_bans;
if(!IsOperK(source_p)) if(!IsOperK(source_p))
{ {

View file

@ -2175,6 +2175,7 @@ static struct ConfEntry conf_general_table[] =
{ "ts_warn_delta", CF_TIME, NULL, 0, &ConfigFileEntry.ts_warn_delta }, { "ts_warn_delta", CF_TIME, NULL, 0, &ConfigFileEntry.ts_warn_delta },
{ "use_whois_actually", CF_YESNO, NULL, 0, &ConfigFileEntry.use_whois_actually }, { "use_whois_actually", CF_YESNO, NULL, 0, &ConfigFileEntry.use_whois_actually },
{ "warn_no_nline", CF_YESNO, NULL, 0, &ConfigFileEntry.warn_no_nline }, { "warn_no_nline", CF_YESNO, NULL, 0, &ConfigFileEntry.warn_no_nline },
{ "use_propagated_bans",CF_YESNO, NULL, 0, &ConfigFileEntry.use_propagated_bans },
{ "\0", 0, NULL, 0, NULL } { "\0", 0, NULL, 0, NULL }
}; };

View file

@ -744,6 +744,7 @@ set_default_conf(void)
ConfigFileEntry.collision_fnc = YES; ConfigFileEntry.collision_fnc = YES;
ConfigFileEntry.global_snotices = YES; ConfigFileEntry.global_snotices = YES;
ConfigFileEntry.operspy_dont_care_user_info = NO; ConfigFileEntry.operspy_dont_care_user_info = NO;
ConfigFileEntry.use_propagated_bans = YES;
#ifdef HAVE_LIBZ #ifdef HAVE_LIBZ
ConfigFileEntry.compression_level = 4; ConfigFileEntry.compression_level = 4;