]> jfr.im git - irc/evilnet/x3.git/commitdiff
Added debug_channel_modes option for spamserv
authorMatthew Beeching <redacted>
Tue, 18 Mar 2014 23:50:20 +0000 (23:50 +0000)
committerMatthew Beeching <redacted>
Tue, 18 Mar 2014 23:50:20 +0000 (23:50 +0000)
src/spamserv.c
x3.conf.example

index b8b48544311bc8ff29ed24dbe3282919b4143afe..a452614284eefd2e492fb764d8a25b74e91bea86 100644 (file)
@@ -43,6 +43,7 @@
 #define KEY_ISSUED                  "issued"
 #define KEY_TRUSTED_ACCOUNTS        "trusted"
 #define KEY_DEBUG_CHANNEL            "debug_channel"
+#define KEY_DEBUG_CHANNEL_MODES      "debug_channel_modes"
 #define KEY_GLOBAL_EXCEPTIONS        "global_exceptions"
 #define KEY_GLOBAL_BADWORDS          "global_badwords"
 #define KEY_NETWORK_RULES            "network_rules"
@@ -3116,7 +3117,7 @@ static void
 spamserv_conf_read(void)
 {
        dict_t conf_node;
-       const char *str
+       const char *str, *modes;
 
        if(!(conf_node = conf_get_data(SPAMSERV_CONF_NAME, RECDB_OBJECT)))
        {
@@ -3128,7 +3129,9 @@ spamserv_conf_read(void)
 
        if(str)
        {
-               spamserv_conf.debug_channel = AddChannel(str, now, "+tinms", NULL, NULL);
+               modes = database_get_data(conf_node, KEY_DEBUG_CHANNEL_MODES, RECDB_QSTRING);
+
+               spamserv_conf.debug_channel = AddChannel(str, now, (modes ? modes : "+tinms"), NULL, NULL);
 
                if(spamserv_conf.debug_channel)
                        spamserv_join_channel(spamserv_conf.debug_channel);
index e4376910623bc445eb78c4adc1eba2d97c51a8cf..c0e384e0eaeee9c667ffba5b8bfe131b49af71d2 100644 (file)
 
         // debug channel
         "debug_channel" "#operserv";
+        "debug_channel_modes" "+tinms";
 
         // url of the network rules. if you don't have network rules, remove this key.
         "network_rules" "http://www.afternet.org/aup";