diff options
author | Adam <Adam@anope.org> | 2010-08-01 16:47:43 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-08-01 16:47:43 -0400 |
commit | e8d6524411e188f4de32a231857b078b57aef151 (patch) | |
tree | 2d1fa7b6857aeab17f2d6f2a867a63ab13b47381 /src/config.cpp | |
parent | d59c1b95e18fd5c9bbec14b8b1b8aab989a3bce7 (diff) |
Fixed botserv bots parting empty channels. This also allows setting bsminusers to 0, which keeps the botserv bot in the channel at all times.
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; } |