summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-08 23:43:51 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-08 23:43:51 +0000
commit9d37cf1d5afeaa054f31e0df85275521410bde61 (patch)
tree6723415d5561a2d7c404e6e1233047f3a9de5f98
parent458be36a321615c0f3004a6abde7e14d40f5da32 (diff)
Made the Module::ServHelp() functions part of the event system
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2637 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--include/modules.h86
-rw-r--r--src/core/bs_act.c4
-rw-r--r--src/core/bs_assign.c4
-rw-r--r--src/core/bs_badwords.c4
-rw-r--r--src/core/bs_bot.c4
-rw-r--r--src/core/bs_botlist.c4
-rw-r--r--src/core/bs_help.c2
-rw-r--r--src/core/bs_info.c4
-rw-r--r--src/core/bs_kick.c4
-rw-r--r--src/core/bs_say.c4
-rw-r--r--src/core/bs_set.c4
-rw-r--r--src/core/bs_unassign.c4
-rw-r--r--src/core/cs_access.c4
-rw-r--r--src/core/cs_akick.c4
-rw-r--r--src/core/cs_ban.c4
-rw-r--r--src/core/cs_clear.c4
-rw-r--r--src/core/cs_drop.c4
-rw-r--r--src/core/cs_forbid.c4
-rw-r--r--src/core/cs_getkey.c4
-rw-r--r--src/core/cs_help.c2
-rw-r--r--src/core/cs_info.c4
-rw-r--r--src/core/cs_invite.c4
-rw-r--r--src/core/cs_kick.c4
-rw-r--r--src/core/cs_list.c4
-rw-r--r--src/core/cs_modes.c4
-rw-r--r--src/core/cs_register.c4
-rw-r--r--src/core/cs_set.c4
-rw-r--r--src/core/cs_status.c4
-rw-r--r--src/core/cs_suspend.c4
-rw-r--r--src/core/cs_topic.c4
-rw-r--r--src/core/cs_xop.c4
-rw-r--r--src/core/hs_del.c4
-rw-r--r--src/core/hs_delall.c4
-rw-r--r--src/core/hs_group.c4
-rw-r--r--src/core/hs_help.c2
-rw-r--r--src/core/hs_list.c4
-rw-r--r--src/core/hs_off.c4
-rw-r--r--src/core/hs_on.c4
-rw-r--r--src/core/hs_set.c4
-rw-r--r--src/core/hs_setall.c4
-rw-r--r--src/core/ms_cancel.c4
-rw-r--r--src/core/ms_check.c4
-rw-r--r--src/core/ms_del.c4
-rw-r--r--src/core/ms_help.c2
-rw-r--r--src/core/ms_info.c4
-rw-r--r--src/core/ms_list.c4
-rw-r--r--src/core/ms_read.c4
-rw-r--r--src/core/ms_rsend.c4
-rw-r--r--src/core/ms_send.c4
-rw-r--r--src/core/ms_sendall.c4
-rw-r--r--src/core/ms_set.c4
-rw-r--r--src/core/ms_staff.c4
-rw-r--r--src/core/ns_access.c4
-rw-r--r--src/core/ns_alist.c4
-rw-r--r--src/core/ns_drop.c4
-rw-r--r--src/core/ns_forbid.c4
-rw-r--r--src/core/ns_getemail.c4
-rw-r--r--src/core/ns_getpass.c4
-rw-r--r--src/core/ns_ghost.c4
-rw-r--r--src/core/ns_group.c4
-rw-r--r--src/core/ns_help.c2
-rw-r--r--src/core/ns_identify.c4
-rw-r--r--src/core/ns_info.c4
-rw-r--r--src/core/ns_list.c4
-rw-r--r--src/core/ns_logout.c4
-rw-r--r--src/core/ns_recover.c4
-rw-r--r--src/core/ns_register.c4
-rw-r--r--src/core/ns_release.c4
-rw-r--r--src/core/ns_saset.c4
-rw-r--r--src/core/ns_sendpass.c4
-rw-r--r--src/core/ns_set.c4
-rw-r--r--src/core/ns_status.c4
-rw-r--r--src/core/ns_suspend.c4
-rw-r--r--src/core/ns_update.c3
-rw-r--r--src/core/os_akill.c4
-rw-r--r--src/core/os_chankill.c4
-rw-r--r--src/core/os_chanlist.c4
-rw-r--r--src/core/os_clearmodes.c4
-rw-r--r--src/core/os_defcon.c6
-rw-r--r--src/core/os_global.c4
-rw-r--r--src/core/os_help.c2
-rw-r--r--src/core/os_ignore.c4
-rw-r--r--src/core/os_jupe.c4
-rw-r--r--src/core/os_kick.c4
-rw-r--r--src/core/os_mode.c4
-rw-r--r--src/core/os_modinfo.c4
-rw-r--r--src/core/os_modlist.c4
-rw-r--r--src/core/os_modload.c4
-rw-r--r--src/core/os_modunload.c4
-rw-r--r--src/core/os_news.c6
-rw-r--r--src/core/os_noop.c4
-rw-r--r--src/core/os_oline.c4
-rw-r--r--src/core/os_quit.c4
-rw-r--r--src/core/os_reload.c4
-rw-r--r--src/core/os_restart.c4
-rw-r--r--src/core/os_session.c4
-rw-r--r--src/core/os_set.c4
-rw-r--r--src/core/os_sgline.c4
-rw-r--r--src/core/os_shutdown.c4
-rw-r--r--src/core/os_sqline.c4
-rw-r--r--src/core/os_staff.c4
-rw-r--r--src/core/os_stats.c4
-rw-r--r--src/core/os_svsnick.c4
-rw-r--r--src/core/os_szline.c4
-rw-r--r--src/core/os_umode.c4
-rw-r--r--src/core/os_update.c4
-rw-r--r--src/core/os_userlist.c4
-rw-r--r--src/modules.c34
-rw-r--r--src/modules/cs_appendtopic.c4
-rw-r--r--src/modules/cs_enforce.c4
-rw-r--r--src/modules/cs_tban.c4
-rw-r--r--src/modules/hs_request.c4
-rw-r--r--src/modules/os_info.c7
113 files changed, 361 insertions, 197 deletions
diff --git a/include/modules.h b/include/modules.h
index d5fddcc44..47e4483d1 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -383,48 +383,6 @@ class CoreExport Module
*/
virtual Version GetVersion() { return Version(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD); }
- /** 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 /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 /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 /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 /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 /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
* @param langNumber the language number for the strings
@@ -487,6 +445,36 @@ class CoreExport Module
*/
bool DelCallBack(Timer *t);
+ /** Called on NickServ HELP
+ * @param u The user requesting help
+ */
+ virtual void OnNickServHelp(User *u) { }
+
+ /** Called on ChanServ HELP
+ * @param u The user requesting help
+ */
+ virtual void OnChanServHelp(User *u) { }
+
+ /** Called on Botserv HELP
+ * @param u The user requesting help
+ */
+ virtual void OnBotServHelp(User *u) { }
+
+ /** Called on HostServ HELP
+ * @param u The user requesting help
+ */
+ virtual void OnHostServHelp(User *u) { }
+
+ /** Called on OperServ HELP
+ * @param u The user requesting help
+ */
+ virtual void OnOperServHelp(User *u) { }
+
+ /** Called on MemoServ HELP
+ * @param u The user requesting help
+ */
+ virtual void OnMemoServHelp(User *u) { }
+
/** 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.
@@ -987,29 +975,32 @@ enum Implementation
{
I_BEGIN,
/* NickServ */
- I_OnPreNickExpire, I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop,
+ I_OnNickServHelp, I_OnPreNickExpire, I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop,
I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended,
I_OnFindUser, I_OnFindNick, I_OnDelNick, I_OnFindCore, I_OnDelCore, I_OnChangeCoreDisplay,
I_OnFindRequestNick, I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickEraseAccess,
/* ChanServ */
- I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnPreChanExpire, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange,
+ I_OnChanServHelp, I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnPreChanExpire, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange,
I_OnAccessDel, I_OnAccessClear, I_OnChanRegistered, I_OnChanUnsuspend, I_OnDelChan, I_OnChannelCreate,
I_OnChannelDelete,
/* BotServ */
- I_OnBotJoin, I_OnBotKick, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnBotAssign, I_OnBotUnAssign,
+ I_OnBotServHelp, I_OnBotJoin, I_OnBotKick, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnBotAssign, I_OnBotUnAssign,
I_OnUserKicked, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan, I_OnBotPreLoad,
/* HostServ */
- I_OnDeleteHostCore, I_OnFindHostCore, I_OnInsertHostCore,
+ I_OnHostServHelp, I_OnDeleteHostCore, I_OnFindHostCore, I_OnInsertHostCore,
+
+ /* MemoServ */
+ I_OnMemoServHelp,
/* Users */
I_OnPreUserConnect, I_OnUserConnect, I_OnUserNickChange, I_OnUserQuit, I_OnUserLogoff, I_OnPreJoinChannel,
I_OnJoinChannel, I_OnPrePartChannel, I_OnPartChannel,
/* OperServ */
- I_OnDefconLevel,
+ I_OnOperServHelp, I_OnDefconLevel,
/* Other */
I_OnReload, I_OnPreServerConnect, I_OnNewServer, I_OnServerConnect, I_OnPreCommandRun, I_OnPreCommand, I_OnPostCommand, I_OnPostLoadDatabases, I_OnSaveDatabase, I_OnBackupDatabase,
@@ -1146,7 +1137,6 @@ struct MessageHash_ {
MDE Module *findModule(const char *name); /* Find a module */
int protocol_module_init(); /* Load the IRCD Protocol Module up*/
-MDE void moduleDisplayHelp(const char *service, User *u);
/*************************************************************************/
/*************************************************************************/
diff --git a/src/core/bs_act.c b/src/core/bs_act.c
index c8616170a..96d7e3c93 100644
--- a/src/core/bs_act.c
+++ b/src/core/bs_act.c
@@ -76,8 +76,10 @@ class BSAct : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAct());
+
+ ModuleManager::Attach(I_OnBotServHelp, this);
}
- void BotServHelp(User *u)
+ void OnBotServHelp(User *u)
{
notice_lang(s_BotServ, u, BOT_HELP_CMD_ACT);
}
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c
index e6d619095..d710cb11e 100644
--- a/src/core/bs_assign.c
+++ b/src/core/bs_assign.c
@@ -87,8 +87,10 @@ class BSAssign : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSAssign);
+
+ ModuleManager::Attach(I_OnBotServHelp, this);
}
- void BotServHelp(User *u)
+ void OnBotServHelp(User *u)
{
notice_lang(s_BotServ, u, BOT_HELP_CMD_ASSIGN);
}
diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c
index 405dbf2a6..bef4a7dad 100644
--- a/src/core/bs_badwords.c
+++ b/src/core/bs_badwords.c
@@ -296,8 +296,10 @@ class BSBadwords : public Module
this->SetVersion("$Id$");
this->SetType(CORE);
this->AddCommand(BOTSERV, new CommandBSBadwords);
+
+ ModuleManager::Attach(I_OnBotServHelp, this);
}
- void BotServHelp(User *u)
+ void OnBotServHelp(User *u)
{
notice_lang(s_BotServ, u, BOT_HELP_CMD_BADWORDS);
}
diff --git a/src/core/bs_b