summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
committerAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
commitf858164deed48f2dcacd5ffc06a55398a54da7e8 (patch)
tree89c3cf36bd8e94942370135218d67d6d17ee222e /src/modules.cpp
parent924f6849fee4598a1a3a7f1a98d96b79e5ffd3b4 (diff)
Rewrote how commands are handled within Anope.
This allows naming commands and having spaces within command names.
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp43
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)
{
}