mirror of
https://github.com/anope/anope.git
synced 2026-07-02 23:43:12 +02:00
Fixed botserv bots parting empty channels. This also allows setting bsminusers to 0, which keeps the botserv bot in the channel at all times.
This commit is contained in:
+6
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user