summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-03-09 14:31:50 +0000
committerSadie Powell <sadie@witchery.services>2025-03-09 14:33:29 +0000
commit1e8ac58bb4e85df3fe329425128f95581252498f (patch)
treee4248f2cf85e0c0bd6089662f8ab32d9309d2d14
parentbadcf31499d8dd4023d10d623c7a7dadef254f95 (diff)
Sync the chanserv defaults between the code and config.
-rw-r--r--data/chanserv.example.conf4
-rw-r--r--modules/chanserv/chanserv.cpp13
2 files changed, 10 insertions, 7 deletions
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf
index a666e43ac..13315fab2 100644
--- a/data/chanserv.example.conf
+++ b/data/chanserv.example.conf
@@ -102,8 +102,8 @@ module
* to be a registered nick, otherwise the channel will be dropped.
* - none: No defaults
*
- * This directive is optional, if left blank, the options will default to keeptopic, peace,
- * securefounder, and signkick. If you really want no defaults, use "none" by itself as the option.
+ * This directive is optional, if left blank, the options will default to cs_keep_modes, keeptopic, peace,
+ * persist, securefounder, and signkick. If you really want no defaults, use "none" by itself as the option.
*/
defaults = "cs_keep_modes keeptopic peace persist securefounder signkick"
diff --git a/modules/chanserv/chanserv.cpp b/modules/chanserv/chanserv.cpp
index cc6fa4638..bd86410c8 100644
--- a/modules/chanserv/chanserv.cpp
+++ b/modules/chanserv/chanserv.cpp
@@ -116,13 +116,16 @@ public:
ChanServ = bi;
- spacesepstream(conf.GetModule(this).Get<const Anope::string>("defaults", "keeptopic peace securefounder signkick")).GetTokens(defaults);
+ spacesepstream(conf.GetModule(this).Get<const Anope::string>("defaults")).GetTokens(defaults);
if (defaults.empty())
{
- defaults.emplace_back("KEEPTOPIC");
- defaults.emplace_back("PEACE");
- defaults.emplace_back("SECUREFOUNDER");
- defaults.emplace_back("SIGNKICK");
+ defaults = {
+ "CS_KEEP_MODES",
+ "KEEPTOPIC",
+ "PEACE",
+ "SECUREFOUNDER",
+ "SIGNKICK",
+ };
}
else if (defaults[0].equals_ci("none"))
defaults.clear();