diff options
author | Adam <Adam@anope.org> | 2011-02-26 17:54:03 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-02-26 17:54:03 -0500 |
commit | f234a2bfab8a4d900cfc0df91afed530d80738d4 (patch) | |
tree | 0224eb342a7d60cee86995bd87910f858d7a2e53 /modules/extra/hs_request.cpp | |
parent | 28d17a40cef64783addf177fa30fb267db2cbde7 (diff) |
Replaced the few language strings we use with #defines to prevent accidentally translating them if we shouldnt
Diffstat (limited to 'modules/extra/hs_request.cpp')
-rw-r--r-- | modules/extra/hs_request.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/modules/extra/hs_request.cpp b/modules/extra/hs_request.cpp index 0dd3e707b..9a4eb8644 100644 --- a/modules/extra/hs_request.cpp +++ b/modules/extra/hs_request.cpp @@ -68,19 +68,19 @@ class CommandHSRequest : public Command } if (vIdent.length() > Config->UserLen) { - source.Reply(LanguageString::HOST_SET_IDENTTOOLONG, Config->UserLen); + source.Reply(_(HOST_SET_IDENTTOOLONG), Config->UserLen); return MOD_CONT; } else for (Anope::string::iterator s = vIdent.begin(), s_end = vIdent.end(); s != s_end; ++s) if (!isvalidchar(*s)) { - source.Reply(LanguageString::HOST_SET_IDENT_ERROR); + source.Reply(_(HOST_SET_IDENT_ERROR)); return MOD_CONT; } if (!ircd->vident) { - source.Reply(LanguageString::HOST_NO_VIDENT); + source.Reply(_(HOST_NO_VIDENT)); return MOD_CONT; } } @@ -88,13 +88,13 @@ class CommandHSRequest : public Command hostmask = rawhostmask; else { - source.Reply(LanguageString::HOST_SET_TOOLONG, Config->HostLen); + source.Reply(_(HOST_SET_TOOLONG), Config->HostLen); return MOD_CONT; } if (!isValidHost(hostmask, 3)) { - source.Reply(LanguageString::HOST_SET_ERROR); + source.Reply(_(HOST_SET_ERROR)); return MOD_CONT; } @@ -164,7 +164,7 @@ class CommandHSActivate : public Command me->SendMessage(source, _("No request for nick %s found."), nick.c_str()); } else - u->SendMessage(HostServ, LanguageString::NICK_X_NOT_REGISTERED, nick.c_str()); + source.Reply(_(NICK_X_NOT_REGISTERED), nick.c_str()); return MOD_CONT; } @@ -247,7 +247,7 @@ class CommandHSReject : public Command class HSListBase : public Command { protected: - CommandReturn DoList(User *u) + CommandReturn DoList(CommandSource &source) { int counter = 1; int from = 0, to = 0; @@ -260,13 +260,13 @@ class HSListBase : public Command { ++display_counter; if (!hr->ident.empty()) - u->SendMessage(HostServ, _("#%d Nick:\002%s\002, vhost:\002%s\002@\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str()); + source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002@\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->ident.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str()); else - u->SendMessage(HostServ, _("#%d Nick:\002%s\002, vhost:\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str()); + source.Reply(_("#%d Nick:\002%s\002, vhost:\002%s\002 (%s - %s)"), counter, it->first.c_str(), hr->host.c_str(), it->first.c_str(), do_strftime(hr->time).c_str()); } ++counter; } - u->SendMessage(HostServ, _("Displayed all records (Count: \002%d\002)"), display_counter); + source.Reply(_("Displayed all records (Count: \002%d\002)"), display_counter); return MOD_CONT; } @@ -274,11 +274,6 @@ class HSListBase : public Command HSListBase(const Anope::string &cmd, int min, int max) : Command(cmd, min, max, "hostserv/set") { } - - void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) - { - // no-op - } }; class CommandHSWaiting : public HSListBase @@ -291,7 +286,7 @@ class CommandHSWaiting : public HSListBase CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) { - return this->DoList(source.u); + return this->DoList(source); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) |