summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-10-03 15:59:19 -0400
committerAdam <Adam@anope.org>2010-10-03 15:59:19 -0400
commit632f8df76b31f1300e7ac72890567834eac5511e (patch)
treec8566121ac3ab41e7eeaed390be80f5a9ad9bc97 /src/config.cpp
parent663a8b9a1c704bec8e15ec1cf21d716df2db00e7 (diff)
Fixed checking the global block in the config to work ok, fixed having non-core service bots logging messages, fixed setting the topic to the topic setter on inspircd12/20, and fixed logging status mode changes on ts6 ircds
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 7aa90947a..e692682b8 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -620,7 +620,7 @@ bool ValidateOperServ(ServerConfig *config, const Anope::string &tag, const Anop
{
if (!config->s_OperServ.empty())
{
- if ((value.equals_ci("description") || value.equals_ci("globalnick") || value.equals_ci("globaldescription")) && data.GetValue().empty())
+ if (value.equals_ci("description") && data.GetValue().empty())
throw ConfigException("The value for <" + tag + ":" + value + "> cannot be empty when OperServ is enabled!");
else if (value.equals_ci("autokillexpiry") || value.equals_ci("chankillexpiry") || value.equals_ci("snlineexpiry") || value.equals_ci("szlineexpiry") || value.equals_ci("sqlineexpiry"))
return ValidateNotZero(config, tag, value, data);
@@ -632,8 +632,11 @@ bool ValidateOperServ(ServerConfig *config, const Anope::string &tag, const Anop
bool ValidateGlobal(ServerConfig *config, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
- if (!config->s_GlobalNoticer.empty() && config->desc_GlobalNoticer.empty())
- throw ConfigException("The value for <" + tag + ":" + value + "> cannot be empty when Global is enabled!");
+ if (!config->s_GlobalNoticer.empty())
+ {
+ if (value.equals_ci("description") && data.GetValue().empty())
+ throw ConfigException("The value for <" + tag + ":" + value + "> cannot be empty when Global is enabled!");
+ }
return true;
}
@@ -1178,7 +1181,7 @@ void ServerConfig::Read()
{"operserv", "addakiller", "no", new ValueContainerBool(&this->AddAkiller), DT_BOOLEAN, NoValidation},
{"operserv", "opersonly", "no", new ValueContainerBool(&this->OSOpersOnly), DT_BOOLEAN, NoValidation},
{"global", "nick", "", new ValueContainerString(&this->s_GlobalNoticer), DT_STRING | DT_NORELOAD, NoValidation},
- {"global", "description", "Global Noticer", new ValueContainerString(&this->desc_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateGlobal},
+ {"global", "description", "Global Noticer", new ValueContainerString(&this->desc_GlobalNoticer), DT_STRING | DT_NORELOAD, ValidateGlobal},
{"defcon", "defaultlevel", "0", new ValueContainerInt(&DefConLevel), DT_INTEGER, ValidateDefCon},
{"defcon", "level4", "", new ValueContainerString(&DefCon4), DT_STRING, ValidateDefCon},
{"defcon", "level3", "", new ValueContainerString(&DefCon3), DT_STRING, ValidateDefCon},