diff options
author | Adam <Adam@anope.org> | 2013-06-12 02:30:21 +0000 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-06-12 02:30:21 +0000 |
commit | d463ae3b1eb44085ad06193f403bc8ec67b34422 (patch) | |
tree | 63826af31a8095cddd33156ab06f6493cb79f0ec /modules/commands/ns_set.cpp | |
parent | ebda113f448cdde52d4015b75b09211eac182c8e (diff) |
Allow users to change their language to english when the default language is not
Diffstat (limited to 'modules/commands/ns_set.cpp')
-rw-r--r-- | modules/commands/ns_set.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index 4b2dfe684..7b0de5565 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -941,20 +941,21 @@ class CommandNSSetLanguage : public Command if (MOD_RESULT == EVENT_STOP) return; - for (unsigned j = 0; j < Language::Languages.size(); ++j) - { - if (param == "en" || Language::Languages[j] == param) - break; - else if (j + 1 == Language::Languages.size()) + if (param != "en") + for (unsigned j = 0; j < Language::Languages.size(); ++j) { - this->OnSyntaxError(source, ""); - return; + if (Language::Languages[j] == param) + break; + else if (j + 1 == Language::Languages.size()) + { + this->OnSyntaxError(source, ""); + return; + } } - } Log(nc == source.GetAccount() ? LOG_COMMAND : LOG_ADMIN, source, this) << "to change the langauge of " << nc->display << " to " << param; - nc->language = param != "en" ? param : ""; + nc->language = param; source.Reply(_("Language changed to \002English\002.")); } |