diff options
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp index 725138516..7853196ad 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -233,11 +233,16 @@ bool ValidateBotServ(ServerConfig *, const Anope::string &tag, const Anope::stri if (data.GetValue().empty()) throw ConfigException("The value for <" + tag + ":" + value + "> cannot be empty when BotServ is enabled!"); } - else if (value.equals_ci("minusers") || value.equals_ci("badwordsmax") || value.equals_ci("keepdata")) + else if (value.equals_ci("badwordsmax") || value.equals_ci("keepdata")) { if (!data.GetInteger() && !dotime(data.GetValue())) throw ConfigException("The value for <" + tag + ":" + value + "> must be non-zero when BotServ is enabled!"); } + else if (value.equals_ci("minusers")) + { + if (data.GetInteger() < 0) + throw ConfigException("The value for <" + tag + ":" + value + "> must be greater than or equal to zero!"); + } } return true; } |