summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-08 17:00:55 +0000
committerRobin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-08 17:00:55 +0000
commit1072827648ad8809d32f23f5835698ba36690305 (patch)
tree3a1a3784790a71a9c7dd020bcfa55834478f00a8 /include/modules.h
parent21d89df8dd934b3d64ef9910de5ea2ab27a878ab (diff)
Move moduleAddCommand and moduleDelCommand to Module:: members.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1597 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index 8ab8977f0..8accb3828 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -214,6 +214,25 @@ CoreExport class Module
* @return MOD_ERR_OK on success, althing else on fail.
**/
int DelEventHook(const char *name);
+
+ /**
+ * Add a module provided command to the given service.
+ * e.g. AddCommand(NICKSERV,c,MOD_HEAD);
+ * @param cmdTable the services to add the command to
+ * @param c the command to add
+ * @param pos the position to add to, MOD_HEAD, MOD_TAIL, MOD_UNIQUE
+ * @see createCommand
+ * @return MOD_ERR_OK on successfully adding the command
+ */
+ int AddCommand(CommandHash *cmdTable[], Command * c, int pos);
+
+ /**
+ * 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 DelCommand(CommandHash * cmdTable[], const char *name);
};
struct ModuleHash_ {
@@ -362,8 +381,6 @@ MDE int moduleGetConfigDirective(Directive *h);
/* Command Managment Functions */
MDE Command *createCommand(const char *name,int (*func)(User *u),int (*has_priv)(User *u),int help_all, int help_reg, int help_oper, int help_admin,int help_root);
MDE int destroyCommand(Command *c); /* destroy a command */
-MDE int moduleAddCommand(CommandHash *cmdTable[], Command *c, int pos);
-MDE int moduleDelCommand(CommandHash *cmdTable[], const char *name); /* Del a command from a cmd table */
Command *findCommand(CommandHash *cmdTable[], const char *name); /* Find a command */
/*************************************************************************/