summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-01 16:47:43 -0400
committerAdam <Adam@anope.org>2010-08-01 16:47:43 -0400
commite8d6524411e188f4de32a231857b078b57aef151 (patch)
tree2d1fa7b6857aeab17f2d6f2a867a63ab13b47381 /src/config.cpp
parentd59c1b95e18fd5c9bbec14b8b1b8aab989a3bce7 (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.cpp7
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;
}