summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules.h89
-rw-r--r--src/core/bs_act.c18
-rw-r--r--src/core/bs_assign.c17
-rw-r--r--src/core/bs_badwords.c17
-rw-r--r--src/core/bs_bot.c20
-rw-r--r--src/core/bs_botlist.c19
-rw-r--r--src/core/bs_help.c2
-rw-r--r--src/core/bs_info.c18
-rw-r--r--src/core/bs_kick.c18
-rw-r--r--src/core/bs_say.c19
-rw-r--r--src/core/bs_set.c18
-rw-r--r--src/core/bs_unassign.c18
-rw-r--r--src/core/cs_access.c20
-rw-r--r--src/core/cs_akick.c21
-rw-r--r--src/core/cs_ban.c20
-rw-r--r--src/core/cs_clear.c17
-rw-r--r--src/core/cs_drop.c18
-rw-r--r--src/core/cs_forbid.c17
-rw-r--r--src/core/cs_getkey.c16
-rw-r--r--src/core/cs_getpass.c15
-rw-r--r--src/core/cs_help.c2
-rw-r--r--src/core/cs_identify.c19
-rw-r--r--src/core/cs_info.c17
-rw-r--r--src/core/cs_invite.c16
-rw-r--r--src/core/cs_kick.c15
-rw-r--r--src/core/cs_list.c21
-rw-r--r--src/core/cs_logout.c16
-rw-r--r--src/core/cs_modes.c51
-rw-r--r--src/core/cs_register.c17
-rw-r--r--src/core/cs_sendpass.c17
-rw-r--r--src/core/cs_set.c11
-rw-r--r--src/core/cs_status.c17
-rw-r--r--src/core/cs_suspend.c19
-rw-r--r--src/core/cs_topic.c17
-rw-r--r--src/core/cs_xop.c24
-rw-r--r--src/core/hs_del.c17
-rw-r--r--src/core/hs_delall.c17
-rw-r--r--src/core/hs_group.c16
-rw-r--r--src/core/hs_help.c2
-rw-r--r--src/core/hs_list.c16
-rw-r--r--src/core/hs_off.c17
-rw-r--r--src/core/hs_on.c17
-rw-r--r--src/core/hs_set.c17
-rw-r--r--src/core/hs_setall.c15
-rw-r--r--src/core/ms_cancel.c14
-rw-r--r--src/core/ms_check.c16
-rw-r--r--src/core/ms_del.c15
-rw-r--r--src/core/ms_help.c2
-rw-r--r--src/core/ms_info.c16
-rw-r--r--src/core/ms_list.c15
-rw-r--r--src/core/ms_read.c15
-rw-r--r--src/core/ms_rsend.c16
-rw-r--r--src/core/ms_send.c16
-rw-r--r--src/core/ms_sendall.c16
-rw-r--r--src/core/ms_set.c17
-rw-r--r--src/core/ms_staff.c16
-rw-r--r--src/core/ns_access.c17
-rw-r--r--src/core/ns_alist.c17
-rw-r--r--src/core/ns_drop.c17
-rw-r--r--src/core/ns_forbid.c16
-rw-r--r--src/core/ns_getemail.c17
-rw-r--r--src/core/ns_getpass.c17
-rw-r--r--src/core/ns_ghost.c17
-rw-r--r--src/core/ns_group.c19
-rw-r--r--src/core/ns_help.c2
-rw-r--r--src/core/ns_identify.c17
-rw-r--r--src/core/ns_info.c17
-rw-r--r--src/core/ns_list.c19
-rw-r--r--src/core/ns_logout.c17
-rw-r--r--src/core/ns_recover.c17
-rw-r--r--src/core/ns_register.c24
-rw-r--r--src/core/ns_release.c17
-rw-r--r--src/core/ns_saset.c17
-rw-r--r--src/core/ns_sendpass.c17
-rw-r--r--src/core/ns_set.c17
-rw-r--r--src/core/ns_status.c17
-rw-r--r--src/core/ns_suspend.c19
-rw-r--r--src/core/ns_update.c17
-rw-r--r--src/core/os_admin.c16
-rw-r--r--src/core/os_akill.c16
-rw-r--r--src/core/os_chankill.c17
-rw-r--r--src/core/os_chanlist.c17
-rw-r--r--src/core/os_clearmodes.c17
-rw-r--r--src/core/os_defcon.c17
-rw-r--r--src/core/os_global.c16
-rw-r--r--src/core/os_help.c2
-rw-r--r--src/core/os_ignore.c17
-rw-r--r--src/core/os_jupe.c17
-rw-r--r--src/core/os_kick.c17
-rw-r--r--src/core/os_mode.c17
-rw-r--r--src/core/os_modinfo.c17
-rw-r--r--src/core/os_modlist.c18
-rw-r--r--src/core/os_modload.c18
-rw-r--r--src/core/os_modunload.c18
-rw-r--r--src/core/os_news.c25
-rw-r--r--src/core/os_noop.c19
-rw-r--r--src/core/os_oline.c19
-rw-r--r--src/core/os_oper.c17
-rw-r--r--src/core/os_quit.c18
-rw-r--r--src/core/os_reload.c18
-rw-r--r--src/core/os_restart.c17
-rw-r--r--src/core/os_session.c19
-rw-r--r--src/core/os_set.c17
-rw-r--r--src/core/os_sgline.c16
-rw-r--r--src/core/os_shutdown.c18
-rw-r--r--src/core/os_sqline.c16
-rw-r--r--src/core/os_staff.c17
-rw-r--r--src/core/os_stats.c17
-rw-r--r--src/core/os_svsnick.c17
-rw-r--r--src/core/os_szline.c16
-rw-r--r--src/core/os_umode.c17
-rw-r--r--src/core/os_update.c18
-rw-r--r--src/core/os_userlist.c18
-rw-r--r--src/module.cpp6
-rw-r--r--src/modules.c60
-rw-r--r--src/modules/cs_appendtopic.c12
-rw-r--r--src/modules/cs_enforce.c14
-rw-r--r--src/modules/cs_tban.c11
-rw-r--r--src/modules/hs_request.c15
-rw-r--r--src/modules/ns_noop_convert.c3
-rw-r--r--src/modules/os_info.c33
121 files changed, 550 insertions, 1575 deletions
diff --git a/include/modules.h b/include/modules.h
index f08e87015..927dbeb26 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -307,13 +307,6 @@ class CoreExport Module
MODType type;
- void (*nickHelp)(User *u); /* service 1 */
- void (*chanHelp)(User *u); /* 2 */
- void (*memoHelp)(User *u); /* 3 */
- void (*botHelp)(User *u); /* 4 */
- void (*operHelp)(User *u); /* 5 */
- void (*hostHelp)(User *u); /* 6 */
-
MessageHash *msgList[MAX_CMD_HASH];
ModuleLang lang[NUM_LANGS];
@@ -355,47 +348,47 @@ class CoreExport Module
*/
void SetAuthor(const std::string &author);
- /**
- * Add output to nickserv help.
- * when doing a /msg nickserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetNickHelp(void (*func)(User *));
+ /** Add output to NickServ Help.
+ * When doing /msg NickServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void NickServHelp(User *u) { }
- /**
- * Add output to chanserv help.
- * when doing a /msg chanserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetChanHelp(void (*func)(User *));
+ /** Add output to ChanServ Help.
+ * When doing /msg ChanServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void ChanServHelp(User *u) { }
- /**
- * Add output to memoserv help.
- * when doing a /msg memoserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetMemoHelp(void (*func)(User *));
+ /** Add output to MemoServ Help.
+ * When doing /msg MemoServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void MemoServHelp(User *u) { }
- /**
- * Add output to botserv help.
- * when doing a /msg botserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetBotHelp(void (*func)(User *));
+ /** Add output to BotServ Help.
+ * When doing /msg BotServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void BotServHelp(User *u) { }
- /**
- * Add output to operserv help.
- * when doing a /msg operserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetOperHelp(void (*func)(User *));
+ /** Add output to OperServ Help.
+ * When doing /msg OperServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void OperServHelp(User *u) { }
- /**
- * Add output to hostserv help.
- * when doing a /msg hostserv help, your function will be called to allow it to send out a notice() with the code you wish to dispaly
- * @param func a pointer to the function which will display the code
- **/
- void SetHostHelp(void (*func)(User *));
+ /** Add output to HostServ Help.
+ * When doing /msg HostServ HELP, this function will be calloed to allow it to send out
+ * a notice witht he code you wish to display
+ * @Param u The user executing the command
+ */
+ virtual void HostServHelp(User *u) { }
/**
* Allow a module to add a set of language strings to anope
@@ -466,8 +459,6 @@ class CoreExport Module
**/
void DelCallback(const char *name);
-
-
/** Called when the ircd notifies that a user has been kicked from a channel.
* @param c The channel the user has been kicked from.
* @param target The user that has been kicked.
@@ -588,12 +579,6 @@ class CoreExport ModuleManager
*/
static void RunCallbacks();
-
-
-
-
-
-
/** Change the priority of one event in a module.
* Each module event has a list of modules which are attached to that event type. If you wish to be called before or after other specific modules, you may use this
* method (usually within void Module::Prioritize()) to set your events priority. You may use this call in other methods too, however, this is not supported behaviour
@@ -698,7 +683,7 @@ int encryption_module_init(); /* Load the encryption module */
int protocol_module_init(); /* Load the IRCD Protocol Module up*/
void moduleCallBackPrepForUnload(const char *mod_name);
MDE void moduleCallBackDeleteEntry(ModuleCallBack * prev);
-MDE void moduleDisplayHelp(int service, User *u);
+MDE void moduleDisplayHelp(const char *service, User *u);
/*************************************************************************/
/*************************************************************************/
diff --git a/src/core/bs_act.c b/src/core/bs_act.c
index 3003e5afa..758ebc82c 100644
--- a/src/core/bs_act.c
+++ b/src/core/bs_act.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSAct : public Command
{
public:
@@ -81,19 +79,11 @@ class BSAct : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAct(), MOD_UNIQUE);
-
- this->SetBotHelp(myBotServHelp);
+ }
+ void BotServHelp(User *u)
+ {
+ notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
}
};
-
-/**
- * Add the help response to Anopes /bs help output.
- * @param u The user who is requesting help
- **/
-void myBotServHelp(User * u)
-{
- notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
-}
-
MODULE_INIT("bs_act", BSAct)
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c
index f4b891820..913e68224 100644
--- a/src/core/bs_assign.c
+++ b/src/core/bs_assign.c
@@ -15,8 +15,6 @@
#include "module.h"
-void myBotServHelp(User * u);
-
class CommandBSAssign : public Command
{
public:
@@ -93,18 +91,11 @@ class BSAssign : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAssign, MOD_UNIQUE);
-