diff options
Diffstat (limited to 'modules/core/hs_help.cpp')
-rw-r--r-- | modules/core/hs_help.cpp | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/modules/core/hs_help.cpp b/modules/core/hs_help.cpp deleted file mode 100644 index 3cd221e10..000000000 --- a/modules/core/hs_help.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* HostServ core functions - * - * (C) 2003-2011 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for further details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - */ - -/*************************************************************************/ - -#include "module.h" -#include "hostserv.h" - -class CommandHSHelp : public Command -{ - public: - CommandHSHelp() : Command("HELP", 1, 1) - { - this->SetFlag(CFLAG_ALLOW_UNREGISTERED); - this->SetDesc(_("Displays this list and give information about commands")); - } - - CommandReturn Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) - { - mod_help_cmd(hostserv->Bot(), source.u, NULL, params[0]); - return MOD_CONT; - } - - void OnSyntaxError(CommandSource &source, const Anope::string &subcommand) - { - User *u = source.u; - source.Reply(_("%s commands:"), Config->s_HostServ.c_str()); - for (CommandMap::const_iterator it = hostserv->Bot()->Commands.begin(), it_end = hostserv->Bot()->Commands.end(); it != it_end; ++it) - if (!Config->HidePrivilegedCommands || it->second->permission.empty() || u->HasCommand(it->second->permission)) - it->second->OnServHelp(source); - } -}; - -class HSHelp : public Module -{ - CommandHSHelp commandhshelp; - - public: - HSHelp(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE) - { - this->SetAuthor("Anope"); - - if (!hostserv) - throw ModuleException("HostServ is not loaded!"); - - this->AddCommand(hostserv->Bot(), &commandhshelp); - } -}; - -MODULE_INIT(HSHelp) |