summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 63141be0b..fda4d3881 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -101,9 +101,6 @@ ServerConfig::ServerConfig() : errstr(""), config_data()
}
}
- if ((this->NSDefLanguage = langlist[this->NSDefLanguage]) < 0)
- this->NSDefLanguage = DEF_LANGUAGE;
-
if (this->CSDefBantype < 0 || this->CSDefBantype > 3)
{
throw ConfigException("Value of CSDefBantype must be between 0 and 3 included");
@@ -530,15 +527,6 @@ bool ValidatePort(ServerConfig *, const Anope::string &tag, const Anope::string
return true;
}
-bool ValidateLanguage(ServerConfig *, const Anope::string &, const Anope::string &, ValueItem &data)
-{
- int language = data.GetInteger();
- if (language < 1 || language > USED_LANGS)
- throw ConfigException("The value for <nickserv:defaultlanguage> must be between 1 and " + stringify(USED_LANGS) + "!");
- data.Set(--language);
- return true;
-}
-
bool ValidateGuestPrefix(ServerConfig *conf, const Anope::string &tag, const Anope::string &value, ValueItem &data)
{
ValidateNotEmpty(conf, tag, value, data);
@@ -1059,7 +1047,8 @@ void ServerConfig::Read()
{"nickserv", "modules", "", new ValueContainerString(&NickCoreModules), DT_STRING, NoValidation},
{"nickserv", "forceemail", "no", new ValueContainerBool(&this->NSForceEmail), DT_BOOLEAN, ValidateEmailReg},
{"nickserv", "defaults", "secure memosignon memoreceive", new ValueContainerString(&NSDefaults), DT_STRING, NoValidation},
- {"nickserv", "defaultlanguage", "0", new ValueContainerUInt(&this->NSDefLanguage), DT_UINTEGER, ValidateLanguage},
+ {"nickserv", "languages", "", new ValueContainerString(&this->Languages), DT_STRING, NoValidation},
+ {"nickserv", "defaultlanguage", "0", new ValueContainerString(&this->NSDefLanguage), DT_STRING, NoValidation},
{"nickserv", "regdelay", "0", new ValueContainerTime(&this->NSRegDelay), DT_TIME, NoValidation},
{"nickserv", "resenddelay", "0", new ValueContainerTime(&this->NSResendDelay), DT_TIME, NoValidation},
{"nickserv", "expire", "21d", new ValueContainerTime(&this->NSExpire), DT_TIME, NoValidation},