diff options
Diffstat (limited to 'src/modules.cpp')
-rw-r--r-- | src/modules.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index c379a66dd..241054715 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -65,49 +65,6 @@ std::vector<Message *> Anope::FindMessage(const Anope::string &name) return messages; } -/******************************************************************************* - * Command Functions - *******************************************************************************/ - -int Module::AddCommand(BotInfo *bi, Command *c) -{ - if (!bi || !c) - return MOD_ERR_PARAMS; - - c->module = this; - c->service = bi; - - std::pair<CommandMap::iterator, bool> it = bi->Commands.insert(std::make_pair(c->name, c)); - - if (it.second != true) - { - Log() << "Error creating command " << c->name << ". Command already exists!"; - return MOD_ERR_EXISTS; - } - - return MOD_ERR_OK; -} - -/** - * Delete a command from the service given. - * @param cmdTable the cmdTable for the services to remove the command from - * @param name the name of the command to delete from the service - * @return returns MOD_ERR_OK on success - */ -int Module::DelCommand(BotInfo *bi, Command *c) -{ - if (!bi || !c) - return MOD_ERR_PARAMS; - - if (!bi->Commands.erase(c->name)) - return MOD_ERR_NOEXIST; - - c->module = NULL; - c->service = NULL; - - return MOD_ERR_OK; -} - Service::Service(Module *o, const Anope::string &n) : owner(o), name(n) { } |