From: Matthew Beeching Date: Tue, 18 Mar 2014 23:50:20 +0000 (+0000) Subject: Added debug_channel_modes option for spamserv X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/commitdiff_plain/3a498ccda2d848f9f5d3fc5b7ba7308392a4a432 Added debug_channel_modes option for spamserv --- diff --git a/src/spamserv.c b/src/spamserv.c index b8b4854..a452614 100644 --- a/src/spamserv.c +++ b/src/spamserv.c @@ -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); diff --git a/x3.conf.example b/x3.conf.example index e437691..c0e384e 100644 --- a/x3.conf.example +++ b/x3.conf.example @@ -561,6 +561,7 @@ // 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";