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 /modules/core/cs_help.cpp | |
parent | 05e6815d912f0418f6da25a2106dd718796f02fa (diff) |
Changed the language system to use gettext
Diffstat (limited to 'modules/core/cs_help.cpp')
-rw-r--r-- | modules/core/cs_help.cpp | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/modules/core/cs_help.cpp b/modules/core/cs_help.cpp index 2d012fbf6..a8ac4041f 100644 --- a/modules/core/cs_help.cpp +++ b/modules/core/cs_help.cpp @@ -24,38 +24,21 @@ class CommandCSHelp : public Command CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) { - Anope::string cmd = params[0]; - - if (cmd.equals_ci("LEVELS DESC")) - { - int i; - notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC); - if (!levelinfo_maxwidth) - for (i = 0; levelinfo[i].what >= 0; ++i) - { - int len = levelinfo[i].name.length(); - if (len > levelinfo_maxwidth) - levelinfo_maxwidth = len; - } - for (i = 0; levelinfo[i].what >= 0; ++i) - notice_help(Config->s_ChanServ, u, CHAN_HELP_LEVELS_DESC_FORMAT, levelinfo_maxwidth, levelinfo[i].name.c_str(), getstring(u, levelinfo[i].desc)); - } - else - mod_help_cmd(ChanServ, u, cmd); + mod_help_cmd(ChanServ, u, params[0]); return MOD_CONT; } void OnSyntaxError(User *u, const Anope::string &subcommand) { - notice_help(Config->s_ChanServ, u, CHAN_HELP); + u->SendMessage(ChanServ, CHAN_HELP); for (CommandMap::const_iterator it = ChanServ->Commands.begin(); it != ChanServ->Commands.end(); ++it) if (!Config->HidePrivilegedCommands || it->second->permission.empty() || (u->Account() && u->Account()->HasCommand(it->second->permission))) it->second->OnServHelp(u); if (Config->CSExpire >= 86400) - notice_help(Config->s_ChanServ, u, CHAN_HELP_EXPIRES, Config->CSExpire / 86400); + u->SendMessage(ChanServ, CHAN_HELP_EXPIRES, Config->CSExpire / 86400); if (u->Account() && u->Account()->IsServicesOper()) - notice_help(Config->s_ChanServ, u, CHAN_SERVADMIN_HELP); + u->SendMessage(ChanServ, CHAN_SERVADMIN_HELP); } }; |