diff options
author | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-09-26 02:33:01 -0400 |
commit | d646d455e2655be59f6d5bcc56710ac70548ca37 (patch) | |
tree | d236b9d4991d62538a0318f213416396734e72e0 /src/config.cpp | |
parent | 05e6815d912f0418f6da25a2106dd718796f02fa (diff) |
Changed the language system to use gettext
Diffstat (limited to 'src/config.cpp')
-rw-r--r-- | src/config.cpp | 15 |
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}, |