summaryrefslogtreecommitdiff
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
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
-rw-r--r--include/modules.h21
-rw-r--r--src/core/bs_act.c2
-rw-r--r--src/core/bs_assign.c2
-rw-r--r--src/core/bs_badwords.c2
-rw-r--r--src/core/bs_bot.c2
-rw-r--r--src/core/bs_botlist.c2
-rw-r--r--src/core/bs_help.c2
-rw-r--r--src/core/bs_info.c2
-rw-r--r--src/core/bs_kick.c18
-rw-r--r--src/core/bs_say.c2
-rw-r--r--src/core/bs_set.c16
-rw-r--r--src/core/bs_unassign.c2
-rw-r--r--src/core/cs_access.c6
-rw-r--r--src/core/cs_akick.c2
-rw-r--r--src/core/cs_ban.c4
-rw-r--r--src/core/cs_clear.c2
-rw-r--r--src/core/cs_drop.c2
-rw-r--r--src/core/cs_forbid.c2
-rw-r--r--src/core/cs_getkey.c2
-rw-r--r--src/core/cs_getpass.c2
-rw-r--r--src/core/cs_help.c2
-rw-r--r--src/core/cs_identify.c4
-rw-r--r--src/core/cs_info.c2
-rw-r--r--src/core/cs_invite.c2
-rw-r--r--src/core/cs_kick.c2
-rw-r--r--src/core/cs_list.c2
-rw-r--r--src/core/cs_logout.c2
-rw-r--r--src/core/cs_modes.c24
-rw-r--r--src/core/cs_register.c2
-rw-r--r--src/core/cs_sendpass.c2
-rw-r--r--src/core/cs_set.c44
-rw-r--r--src/core/cs_status.c2
-rw-r--r--src/core/cs_suspend.c4
-rw-r--r--src/core/cs_topic.c2
-rw-r--r--src/core/cs_xop.c8
-rw-r--r--src/core/he_help.c2
-rw-r--r--src/core/hs_del.c2
-rw-r--r--src/core/hs_delall.c2
-rw-r--r--src/core/hs_group.c2
-rw-r--r--src/core/hs_help.c2
-rw-r--r--src/core/hs_list.c2
-rw-r--r--src/core/hs_off.c2
-rw-r--r--src/core/hs_on.c2
-rw-r--r--src/core/hs_set.c2
-rw-r--r--src/core/hs_setall.c2
-rw-r--r--src/core/ms_cancel.c2
-rw-r--r--src/core/ms_check.c2
-rw-r--r--src/core/ms_del.c2
-rw-r--r--src/core/ms_help.c2
-rw-r--r--src/core/ms_info.c2
-rw-r--r--src/core/ms_list.c2
-rw-r--r--src/core/ms_read.c2
-rw-r--r--src/core/ms_rsend.c2
-rw-r--r--src/core/ms_send.c2
-rw-r--r--src/core/ms_sendall.c2
-rw-r--r--src/core/ms_set.c6
-rw-r--r--src/core/ms_staff.c2
-rw-r--r--src/core/ns_access.c2
-rw-r--r--src/core/ns_alist.c2
-rw-r--r--src/core/ns_drop.c4
-rw-r--r--src/core/ns_forbid.c2
-rw-r--r--src/core/ns_getemail.c2
-rw-r--r--src/core/ns_getpass.c2
-rw-r--r--src/core/ns_ghost.c2
-rw-r--r--src/core/ns_group.c8
-rw-r--r--src/core/ns_help.c2
-rw-r--r--src/core/ns_identify.c6
-rw-r--r--src/core/ns_info.c2
-rw-r--r--src/core/ns_list.c2
-rw-r--r--src/core/ns_logout.c2
-rw-r--r--src/core/ns_recover.c2
-rw-r--r--src/core/ns_register.c6
-rw-r--r--src/core/ns_release.c2
-rw-r--r--src/core/ns_saset.c30
-rw-r--r--src/core/ns_sendpass.c2
-rw-r--r--src/core/ns_set.c26
-rw-r--r--src/core/ns_status.c2
-rw-r--r--src/core/ns_suspend.c4
-rw-r--r--src/core/ns_update.c2
-rw-r--r--src/core/os_admin.c2
-rw-r--r--src/core/os_akill.c2
-rw-r--r--src/core/os_chankill.c2
-rw-r--r--src/core/os_chanlist.c2
-rw-r--r--src/core/os_clearmodes.c2
-rw-r--r--src/core/os_defcon.c2
-rw-r--r--src/core/os_global.c2
-rw-r--r--src/core/os_help.c2
-rw-r--r--src/core/os_ignore.c2
-rw-r--r--src/core/os_jupe.c2
-rw-r--r--src/core/os_kick.c2
-rw-r--r--src/core/os_logonnews.c2
-rw-r--r--src/core/os_mode.c2
-rw-r--r--src/core/os_modinfo.c2
-rw-r--r--src/core/os_modlist.c2
-rw-r--r--src/core/os_modload.c2
-rw-r--r--src/core/os_modunload.c2
-rw-r--r--src/core/os_noop.c2
-rw-r--r--src/core/os_oline.c2
-rw-r--r--src/core/os_oper.c2
-rw-r--r--src/core/os_opernews.c2
-rw-r--r--src/core/os_quit.c2
-rw-r--r--src/core/os_randomnews.c2
-rw-r--r--src/core/os_raw.c2
-rw-r--r--src/core/os_reload.c2
-rw-r--r--src/core/os_restart.c2
-rw-r--r--src/core/os_session.c4
-rw-r--r--src/core/os_set.c16
-rw-r--r--src/core/os_sgline.c2
-rw-r--r--src/core/os_shutdown.c2
-rw-r--r--src/core/os_sqline.c2
-rw-r--r--src/core/os_staff.c2
-rw-r--r--src/core/os_stats.c4
-rw-r--r--src/core/os_svsnick.c2
-rw-r--r--src/core/os_szline.c2
-rw-r--r--src/core/os_umode.c2
-rw-r--r--src/core/os_update.c2
-rw-r--r--src/core/os_userlist.c2
-rw-r--r--src/modules.c45
-rw-r--r--src/modules/cs_appendtopic.c2
-rw-r--r--src/modules/cs_enforce.c2
-rw-r--r--src/modules/cs_tban.c2
-rw-r--r--src/modules/demos/catserv/catserv_messages.c4
-rw-r--r--src/modules/demos/hs_conf.c2
-rw-r--r--src/modules/demos/hs_moo.c2
-rw-r--r--src/modules/hs_request.c12
-rw-r--r--src/modules/ns_maxemail.c4
-rw-r--r--src/modules/os_info.c8
127 files changed, 267 insertions, 271 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 */
/*************************************************************************/
diff --git a/src/core/bs_act.c b/src/core/bs_act.c
index 162d321ad..a5c8864da 100644
--- a/src/core/bs_act.c
+++ b/src/core/bs_act.c
@@ -29,7 +29,7 @@ class BSAct : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
c = createCommand("ACT", do_act, NULL, BOT_HELP_ACT, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleSetBotHelp(myBotServHelp);
}
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c
index b28542141..7cb6e3887 100644
--- a/src/core/bs_assign.c
+++ b/src/core/bs_assign.c
@@ -29,7 +29,7 @@ class BSAssign : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
c = createCommand("ASSIGN", do_assign, NULL, BOT_HELP_ASSIGN, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleSetBotHelp(myBotServHelp);
}
diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c
index c5b13e436..65190c286 100644
--- a/src/core/bs_badwords.c
+++ b/src/core/bs_badwords.c
@@ -33,7 +33,7 @@ class BSBadwords : public Module
this->SetType(CORE);
c = createCommand("BADWORDS", do_badwords, NULL, BOT_HELP_BADWORDS, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleSetBotHelp(myBotServHelp);
}
diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c
index 3ec37f0a6..93dfc89da 100644
--- a/src/core/bs_bot.c
+++ b/src/core/bs_bot.c
@@ -30,7 +30,7 @@ class BSBot : public Module
this->SetType(CORE);
c = createCommand("BOT", do_bot, is_services_admin, -1, -1, -1, BOT_SERVADMIN_HELP_BOT, BOT_SERVADMIN_HELP_BOT);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleSetBotHelp(myBotServHelp);
}
diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c
index 51a65866c..7173a7807 100644
--- a/src/core/bs_botlist.c
+++ b/src/core/bs_botlist.c
@@ -29,7 +29,7 @@ class BSBotList : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
c = createCommand("BOTLIST", do_botlist, NULL, BOT_HELP_BOTLIST, -1, -1, -1, -1);
- moduleAddCommand(BOTSERV, c, MOD_UNIQUE);
+ this->AddCommand(BOTSERV, c, MOD_UNIQUE);
moduleSetBotHelp(myBotServHelp);
}
diff --git a/src/core/bs