]> jfr.im git - solanum.git/commitdiff
Add option general::use_propagated_bans to allow disabling new KLINE.
authorJilles Tjoelker <redacted>
Sun, 14 Mar 2010 16:21:20 +0000 (17:21 +0100)
committerJilles Tjoelker <redacted>
Sun, 14 Mar 2010 16:21:20 +0000 (17:21 +0100)
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.

doc/example.conf
doc/reference.conf
include/s_conf.h
modules/m_info.c
modules/m_kline.c
src/newconf.c
src/s_conf.c

index 6a79129ee1a54e6a6a7cb271e0ad9563da4da0f0..4848ed04f3fc25d17f37986fc2cc3b1de0678e04 100755 (executable)
@@ -457,6 +457,7 @@ general {
        identify_command = "IDENTIFY";
        non_redundant_klines = yes;
        warn_no_nline = yes;
+       use_propagated_bans = yes;
        stats_e_disabled = no;
        stats_c_oper_only=no;
        stats_h_oper_only=no;
index 10971d4d5ce7a185226264271dc7d5473926ed44..ce2831092a636d533afcf486009f4446d3b97f1f 100755 (executable)
@@ -1030,6 +1030,13 @@ general {
         */
        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
         * exempted and you dont want them listing on irc.
         */
index 4cacc5e0c0a905a1b04e5fce1be508c8a4143f7a..03d78a668235fe2eee87b44054b940e6f47af73e 100644 (file)
@@ -223,6 +223,7 @@ struct config_file_entry
        int default_umodes;
        int global_snotices;
        int operspy_dont_care_user_info;
+       int use_propagated_bans;
 };
 
 struct config_channel_entry
index d3ddb3b88bf5df161fab268f8882cb7633a24fd6..3cdd7ba431aa7beec716550a51d63806f35bd4a3 100644 (file)
@@ -482,6 +482,12 @@ static struct InfoStruct info_table[] = {
                &ConfigFileEntry.warn_no_nline,
                "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",
                OUTPUT_DECIMAL,
index 46ff73040dfd89136940fc6e2a8ff20fae7fde28..364c30b0f7f8fdd86782520d9e662941cab1653b 100644 (file)
@@ -107,7 +107,7 @@ mo_kline(struct Client *client_p, struct Client *source_p, int parc, const char
        struct ConfItem *aconf;
        int tkline_time = 0;
        int loc = 1;
-       int propagated = 1;
+       int propagated = ConfigFileEntry.use_propagated_bans;
 
        if(!IsOperK(source_p))
        {
index 24749a83330f773bc64f50e18fcd6d46a5d92731..307d08905dc5c60938ea7fce89208fd9d7574b70 100644 (file)
@@ -2175,6 +2175,7 @@ static struct ConfEntry conf_general_table[] =
        { "ts_warn_delta",      CF_TIME,  NULL, 0, &ConfigFileEntry.ts_warn_delta       },
        { "use_whois_actually", CF_YESNO, NULL, 0, &ConfigFileEntry.use_whois_actually  },
        { "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 }
 };
 
index 946380dbb3c8498f8e993596910c091e11901d6f..11d2d0a10cb0995c8af8b227a0fe80be871794eb 100644 (file)
@@ -744,6 +744,7 @@ set_default_conf(void)
        ConfigFileEntry.collision_fnc = YES;
        ConfigFileEntry.global_snotices = YES;
        ConfigFileEntry.operspy_dont_care_user_info = NO;
+       ConfigFileEntry.use_propagated_bans = YES;
 
 #ifdef HAVE_LIBZ
        ConfigFileEntry.compression_level = 4;