1
0
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:
Adam
2010-08-01 16:47:43 -04:00
parent d59c1b95e1
commit e8d6524411
5 changed files with 17 additions and 10 deletions
+6 -1
View File
@@ -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;
}