diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-08 23:43:51 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-08 23:43:51 +0000 |
commit | 9d37cf1d5afeaa054f31e0df85275521410bde61 (patch) | |
tree | 6723415d5561a2d7c404e6e1233047f3a9de5f98 /src | |
parent | 458be36a321615c0f3004a6abde7e14d40f5da32 (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
Diffstat (limited to 'src')
112 files changed, 323 insertions, 149 deletions
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_bot.c b/src/core/bs_bot.c index 6c6c83ea1..e6a6e59e8 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -434,8 +434,10 @@ class BSBot : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSBot()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_BOT); } diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c index c29ce19ee..9c3e27060 100644 --- a/src/core/bs_botlist.c +++ b/src/core/bs_botlist.c @@ -79,8 +79,10 @@ class BSBotList : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSBotList()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_BOTLIST); } diff --git a/src/core/bs_help.c b/src/core/bs_help.c index e76943636..ae0e73fdf 100644 --- a/src/core/bs_help.c +++ b/src/core/bs_help.c @@ -34,7 +34,7 @@ class CommandBSHelp : public Command { // Abuse syntax error to display general list help. notice_help(s_BotServ, u, BOT_HELP); - moduleDisplayHelp(s_BotServ, u); + FOREACH_MOD(I_OnBotServHelp, OnBotServHelp(u)); notice_help(s_BotServ, u, BOT_HELP_FOOTER, BSMinUsers); } }; diff --git a/src/core/bs_info.c b/src/core/bs_info.c index 0ea8a5791..eb438e572 100644 --- a/src/core/bs_info.c +++ b/src/core/bs_info.c @@ -253,8 +253,10 @@ class BSInfo : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSInfo()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_INFO); } diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c index 0ce210019..c1294c9c2 100644 --- a/src/core/bs_kick.c +++ b/src/core/bs_kick.c @@ -357,8 +357,10 @@ class BSKick : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSKick()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_KICK); } diff --git a/src/core/bs_say.c b/src/core/bs_say.c index dbca41518..f0f8c8454 100644 --- a/src/core/bs_say.c +++ b/src/core/bs_say.c @@ -83,8 +83,10 @@ class BSSay : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSSay()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_SAY); } diff --git a/src/core/bs_set.c b/src/core/bs_set.c index d5d40abd5..ec569c205 100644 --- a/src/core/bs_set.c +++ b/src/core/bs_set.c @@ -187,8 +187,10 @@ class BSSet : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSSet()); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_SET); } diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c index af7f9d7d5..6b8a89eba 100644 --- a/src/core/bs_unassign.c +++ b/src/core/bs_unassign.c @@ -63,8 +63,10 @@ class BSUnassign : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(BOTSERV, new CommandBSUnassign); + + ModuleManager::Attach(I_OnBotServHelp, this); } - void BotServHelp(User *u) + void OnBotServHelp(User *u) { notice_lang(s_BotServ, u, BOT_HELP_CMD_UNASSIGN); } diff --git a/src/core/cs_access.c b/src/core/cs_access.c index 11fc323e7..83ea0f0f7 100644 --- a/src/core/cs_access.c +++ b/src/core/cs_access.c @@ -564,8 +564,10 @@ class CSAccess : public Module this->AddCommand(CHANSERV, new CommandCSAccess()); this->AddCommand(CHANSERV, new CommandCSLevels()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_ACCESS); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LEVELS); diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c index 078cd0e2e..c0f3fc12c 100644 --- a/src/core/cs_akick.c +++ b/src/core/cs_akick.c @@ -585,8 +585,10 @@ class CSAKick : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSAKick()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_AKICK); } diff --git a/src/core/cs_ban.c b/src/core/cs_ban.c index b6873ba89..dcb051eb2 100644 --- a/src/core/cs_ban.c +++ b/src/core/cs_ban.c @@ -169,8 +169,10 @@ class CSBan : public Module this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSBan()); this->AddCommand(CHANSERV, new CommandCSUnban()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_BAN); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNBAN); diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c index 699c70a2f..a4f6cd224 100644 --- a/src/core/cs_clear.c +++ b/src/core/cs_clear.c @@ -290,8 +290,10 @@ class CSClear : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSClear()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_CLEAR); } diff --git a/src/core/cs_drop.c b/src/core/cs_drop.c index 74d799af8..7de9b7327 100644 --- a/src/core/cs_drop.c +++ b/src/core/cs_drop.c @@ -117,8 +117,10 @@ class CSDrop : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSDrop()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_DROP); } diff --git a/src/core/cs_forbid.c b/src/core/cs_forbid.c index ccfc1f5bd..9eefe4cfc 100644 --- a/src/core/cs_forbid.c +++ b/src/core/cs_forbid.c @@ -127,8 +127,10 @@ class CSForbid : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSForbid()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_FORBID); } diff --git a/src/core/cs_getkey.c b/src/core/cs_getkey.c index 8c1e127ee..447b866b7 100644 --- a/src/core/cs_getkey.c +++ b/src/core/cs_getkey.c @@ -68,8 +68,10 @@ class CSGetKey : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSGetKey()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_GETKEY); } diff --git a/src/core/cs_help.c b/src/core/cs_help.c index 21bbc00eb..267483f8d 100644 --- a/src/core/cs_help.c +++ b/src/core/cs_help.c @@ -55,7 +55,7 @@ class CommandCSHelp : public Command void OnSyntaxError(User *u) { notice_help(s_ChanServ, u, CHAN_HELP); - moduleDisplayHelp(s_ChanServ, u); + FOREACH_MOD(I_OnChanServHelp, OnChanServHelp(u)); if (CSExpire >= 86400) notice_help(s_ChanServ, u, CHAN_HELP_EXPIRES, CSExpire / 86400); if (u->nc && u->nc->IsServicesOper()) diff --git a/src/core/cs_info.c b/src/core/cs_info.c index 5271764b9..52699b515 100644 --- a/src/core/cs_info.c +++ b/src/core/cs_info.c @@ -172,8 +172,10 @@ class CSInfo : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSInfo()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INFO); } diff --git a/src/core/cs_invite.c b/src/core/cs_invite.c index 3198a9785..c51d85300 100644 --- a/src/core/cs_invite.c +++ b/src/core/cs_invite.c @@ -85,8 +85,10 @@ class CSInvite : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSInvite()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_INVITE); } diff --git a/src/core/cs_kick.c b/src/core/cs_kick.c index 960cfea9d..6bea58a9f 100644 --- a/src/core/cs_kick.c +++ b/src/core/cs_kick.c @@ -102,8 +102,10 @@ class CSKick : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSKick()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_KICK); } diff --git a/src/core/cs_list.c b/src/core/cs_list.c index 087d0c664..af5636e4e 100644 --- a/src/core/cs_list.c +++ b/src/core/cs_list.c @@ -192,8 +192,10 @@ public: this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSList()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST); } diff --git a/src/core/cs_modes.c b/src/core/cs_modes.c index 88b3770c7..981591e77 100644 --- a/src/core/cs_modes.c +++ b/src/core/cs_modes.c @@ -404,8 +404,10 @@ class CSModes : public Module this->AddCommand(CHANSERV, new CommandCSOwner()); this->AddCommand(CHANSERV, new CommandCSDeOwner()); } + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { if (ModeManager::FindChannelModeByName(CMODE_OWNER)) { diff --git a/src/core/cs_register.c b/src/core/cs_register.c index 3b1137766..e6ccde8cf 100644 --- a/src/core/cs_register.c +++ b/src/core/cs_register.c @@ -113,8 +113,10 @@ class CSRegister : public Module this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSRegister()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_REGISTER); } diff --git a/src/core/cs_set.c b/src/core/cs_set.c index e556c7a49..48eef2ba9 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -671,8 +671,10 @@ class CSSet : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSSet()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SET); } diff --git a/src/core/cs_status.c b/src/core/cs_status.c index b1f269cbc..cada09062 100644 --- a/src/core/cs_status.c +++ b/src/core/cs_status.c @@ -68,8 +68,10 @@ class CSStatus : public Module this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSStatus()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_STATUS); } diff --git a/src/core/cs_suspend.c b/src/core/cs_suspend.c index dd6511a47..7d29509b3 100644 --- a/src/core/cs_suspend.c +++ b/src/core/cs_suspend.c @@ -189,8 +189,10 @@ class CSSuspend : public Module this->AddCommand(CHANSERV, new CommandCSSuspend()); this->AddCommand(CHANSERV, new CommandCSUnSuspend()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_SUSPEND); notice_lang(s_ChanServ, u, CHAN_HELP_CMD_UNSUSPEND); diff --git a/src/core/cs_topic.c b/src/core/cs_topic.c index 47e090d28..ab7b5e7c4 100644 --- a/src/core/cs_topic.c +++ b/src/core/cs_topic.c @@ -90,8 +90,10 @@ class CSTopic : public Module this->SetType(CORE); this->AddCommand(CHANSERV, new CommandCSTopic()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { notice_lang(s_ChanServ, u, CHAN_HELP_CMD_TOPIC); } diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index 52bf1e4f1..8dfbf8a85 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -547,8 +547,10 @@ class CSXOP : public Module this->AddCommand(CHANSERV, new CommandCSHOP()); this->AddCommand(CHANSERV, new CommandCSSOP()); this->AddCommand(CHANSERV, new CommandCSVOP()); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { if (ModeManager::FindChannelModeByName(CMODE_OWNER)) notice_lang(s_ChanServ, u, CHAN_HELP_CMD_QOP); diff --git a/src/core/hs_del.c b/src/core/hs_del.c index 0781dc8f6..080aff1c2 100644 --- a/src/core/hs_del.c +++ b/src/core/hs_del.c @@ -64,8 +64,10 @@ class HSDel : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSDel()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_DEL); } diff --git a/src/core/hs_delall.c b/src/core/hs_delall.c index 714f23eef..82eef36a9 100644 --- a/src/core/hs_delall.c +++ b/src/core/hs_delall.c @@ -71,8 +71,10 @@ class HSDelAll : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSDelAll()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_DELALL); } diff --git a/src/core/hs_group.c b/src/core/hs_group.c index 4e6c8a3f2..f50e06f9d 100644 --- a/src/core/hs_group.c +++ b/src/core/hs_group.c @@ -83,8 +83,10 @@ class HSGroup : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSGroup()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_GROUP); } diff --git a/src/core/hs_help.c b/src/core/hs_help.c index 27399726b..da0e6d4ee 100644 --- a/src/core/hs_help.c +++ b/src/core/hs_help.c @@ -32,7 +32,7 @@ class CommandHSHelp : public Command void OnSyntaxError(User *u) { notice_help(s_HostServ, u, HOST_HELP, s_HostServ); - moduleDisplayHelp(s_HostServ, u); + FOREACH_MOD(I_OnHostServHelp, OnHostServHelp(u)); } }; diff --git a/src/core/hs_list.c b/src/core/hs_list.c index 16fd94341..5c1dd136b 100644 --- a/src/core/hs_list.c +++ b/src/core/hs_list.c @@ -152,8 +152,10 @@ class HSList : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSList()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_LIST); } diff --git a/src/core/hs_off.c b/src/core/hs_off.c index 0e5695c4e..b30d85250 100644 --- a/src/core/hs_off.c +++ b/src/core/hs_off.c @@ -57,8 +57,10 @@ class HSOff : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSOff()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_OFF); } diff --git a/src/core/hs_on.c b/src/core/hs_on.c index e78e93c68..7308f4c32 100644 --- a/src/core/hs_on.c +++ b/src/core/hs_on.c @@ -72,8 +72,10 @@ class HSOn : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSOn()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_ON); } diff --git a/src/core/hs_set.c b/src/core/hs_set.c index f9a3d80f1..5db2c4f25 100644 --- a/src/core/hs_set.c +++ b/src/core/hs_set.c @@ -161,8 +161,10 @@ class HSSet : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSSet()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_SET); } diff --git a/src/core/hs_setall.c b/src/core/hs_setall.c index 8343eb0f9..344ed1e51 100644 --- a/src/core/hs_setall.c +++ b/src/core/hs_setall.c @@ -162,8 +162,10 @@ class HSSetAll : public Module this->SetType(CORE); this->AddCommand(HOSTSERV, new CommandHSSetAll()); + + ModuleManager::Attach(I_OnHostServHelp, this); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { notice_lang(s_HostServ, u, HOST_HELP_CMD_SETALL); } diff --git a/src/core/ms_cancel.c b/src/core/ms_cancel.c index e01fef169..9a43a7e3a 100644 --- a/src/core/ms_cancel.c +++ b/src/core/ms_cancel.c @@ -80,8 +80,10 @@ class MSCancel : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSCancel()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CANCEL); } diff --git a/src/core/ms_check.c b/src/core/ms_check.c index 2d3f2ce12..b415f3472 100644 --- a/src/core/ms_check.c +++ b/src/core/ms_check.c @@ -97,8 +97,10 @@ class MSCheck : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSCheck()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_CHECK); } diff --git a/src/core/ms_del.c b/src/core/ms_del.c index 70720c111..e45ad08a5 100644 --- a/src/core/ms_del.c +++ b/src/core/ms_del.c @@ -153,8 +153,10 @@ class MSDel : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSDel()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_DEL); } diff --git a/src/core/ms_help.c b/src/core/ms_help.c index 985558652..f54ac9e6d 100644 --- a/src/core/ms_help.c +++ b/src/core/ms_help.c @@ -32,7 +32,7 @@ class CommandMSHelp : public Command void OnSyntaxError(User *u) { notice_help(s_MemoServ, u, MEMO_HELP_HEADER); - moduleDisplayHelp(s_MemoServ, u); + FOREACH_MOD(I_OnMemoServHelp, OnMemoServHelp(u)); notice_help(s_MemoServ, u, MEMO_HELP_FOOTER, s_ChanServ); } }; diff --git a/src/core/ms_info.c b/src/core/ms_info.c index 76e605478..1a2d0289b 100644 --- a/src/core/ms_info.c +++ b/src/core/ms_info.c @@ -210,8 +210,10 @@ class MSInfo : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSInfo()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_INFO); } diff --git a/src/core/ms_list.c b/src/core/ms_list.c index bcd5e90a8..f7dd10d82 100644 --- a/src/core/ms_list.c +++ b/src/core/ms_list.c @@ -117,8 +117,10 @@ class MSList : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSList()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_LIST); } diff --git a/src/core/ms_read.c b/src/core/ms_read.c index 7e54d6629..7573ddbb7 100644 --- a/src/core/ms_read.c +++ b/src/core/ms_read.c @@ -126,8 +126,10 @@ class MSRead : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSRead()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_READ); } diff --git a/src/core/ms_rsend.c b/src/core/ms_rsend.c index 2ccc2d443..9aafbbf1d 100644 --- a/src/core/ms_rsend.c +++ b/src/core/ms_rsend.c @@ -90,8 +90,10 @@ class MSRSend : public Module if (!MSMemoReceipt) throw ModuleException("Don't like memo reciepts, or something."); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_RSEND); } diff --git a/src/core/ms_send.c b/src/core/ms_send.c index 84d0141f4..992b3ed36 100644 --- a/src/core/ms_send.c +++ b/src/core/ms_send.c @@ -52,8 +52,10 @@ class MSSend : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSSend()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SEND); } diff --git a/src/core/ms_sendall.c b/src/core/ms_sendall.c index 56dfbf1c2..7bed4ebac 100644 --- a/src/core/ms_sendall.c +++ b/src/core/ms_sendall.c @@ -68,8 +68,10 @@ class MSSendAll : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSSendAll()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SENDALL); } diff --git a/src/core/ms_set.c b/src/core/ms_set.c index 3ebb3b354..334990660 100644 --- a/src/core/ms_set.c +++ b/src/core/ms_set.c @@ -264,8 +264,10 @@ class MSSet : public Module this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSSet()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_SET); } diff --git a/src/core/ms_staff.c b/src/core/ms_staff.c index e472a0108..76114ada5 100644 --- a/src/core/ms_staff.c +++ b/src/core/ms_staff.c @@ -66,8 +66,10 @@ class MSStaff : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(MEMOSERV, new CommandMSStaff()); + + ModuleManager::Attach(I_OnMemoServHelp, this); } - void MemoServHelp(User *u) + void OnMemoServHelp(User *u) { notice_lang(s_MemoServ, u, MEMO_HELP_CMD_STAFF); } diff --git a/src/core/ns_access.c b/src/core/ns_access.c index 0d9d1bdcb..43edd846f 100644 --- a/src/core/ns_access.c +++ b/src/core/ns_access.c @@ -181,8 +181,10 @@ class NSAccess : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSAccess()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_ACCESS); } diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c index f1fc883f9..2c0c72b12 100644 --- a/src/core/ns_alist.c +++ b/src/core/ns_alist.c @@ -149,8 +149,10 @@ class NSAList : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSAList()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_ALIST); } diff --git a/src/core/ns_drop.c b/src/core/ns_drop.c index ac17164e7..1e15aa292 100644 --- a/src/core/ns_drop.c +++ b/src/core/ns_drop.c @@ -117,8 +117,10 @@ class NSDrop : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSDrop()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_DROP); } diff --git a/src/core/ns_forbid.c b/src/core/ns_forbid.c index 5b1232970..524dab5e3 100644 --- a/src/core/ns_forbid.c +++ b/src/core/ns_forbid.c @@ -110,8 +110,10 @@ class NSForbid : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSForbid()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_FORBID); } diff --git a/src/core/ns_getemail.c b/src/core/ns_getemail.c index c390e9a54..636b703be 100644 --- a/src/core/ns_getemail.c +++ b/src/core/ns_getemail.c @@ -78,8 +78,10 @@ class NSGetEMail : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSGetEMail()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GETEMAIL); } diff --git a/src/core/ns_getpass.c b/src/core/ns_getpass.c index 6cb01c89e..aa524eacd 100644 --- a/src/core/ns_getpass.c +++ b/src/core/ns_getpass.c @@ -86,8 +86,10 @@ class NSGetPass : public Module char tmp_pass[PASSMAX]; if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1)) throw ModuleException("Incompatible with the encryption module being used"); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GETPASS); } diff --git a/src/core/ns_ghost.c b/src/core/ns_ghost.c index 439d3f667..a7823f063 100644 --- a/src/core/ns_ghost.c +++ b/src/core/ns_ghost.c @@ -96,8 +96,10 @@ class NSGhost : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSGhost()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GHOST); } diff --git a/src/core/ns_group.c b/src/core/ns_group.c index 5d4bc3bec..5e6354598 100644 --- a/src/core/ns_group.c +++ b/src/core/ns_group.c @@ -220,8 +220,10 @@ class NSGroup : public Module this->AddCommand(NICKSERV, new CommandNSGroup()); this->AddCommand(NICKSERV, new CommandNSGList()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_GROUP); notice_lang(s_NickServ, u, NICK_HELP_CMD_GLIST); diff --git a/src/core/ns_help.c b/src/core/ns_help.c index 164fa0346..29c71a5c5 100644 --- a/src/core/ns_help.c +++ b/src/core/ns_help.c @@ -43,7 +43,7 @@ class CommandNSHelp : public Command void OnSyntaxError(User *u) { notice_help(s_NickServ, u, NICK_HELP); - moduleDisplayHelp(s_NickServ, u); + FOREACH_MOD(I_OnNickServHelp, OnNickServHelp(u)); if (u->nc && u->nc->IsServicesOper()) notice_help(s_NickServ, u, NICK_SERVADMIN_HELP); if (NSExpire >= 86400) diff --git a/src/core/ns_identify.c b/src/core/ns_identify.c index bd2359ab0..3204537a0 100644 --- a/src/core/ns_identify.c +++ b/src/core/ns_identify.c @@ -123,8 +123,10 @@ class NSIdentify : public Module this->AddCommand(NICKSERV, new CommandNSIdentify("IDENTIFY")); this->AddCommand(NICKSERV, new CommandNSIdentify("ID")); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_IDENTIFY); } diff --git a/src/core/ns_info.c b/src/core/ns_info.c index fe7b2e00c..c0066a67a 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -217,8 +217,10 @@ class NSInfo : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSInfo()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_INFO); } diff --git a/src/core/ns_list.c b/src/core/ns_list.c index 0c964366d..b411355a9 100644 --- a/src/core/ns_list.c +++ b/src/core/ns_list.c @@ -222,8 +222,10 @@ class NSList : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSList()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_LIST); } diff --git a/src/core/ns_logout.c b/src/core/ns_logout.c index a4716be8f..5074ddf95 100644 --- a/src/core/ns_logout.c +++ b/src/core/ns_logout.c @@ -100,8 +100,10 @@ class NSLogout : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSLogout()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_LOGOUT); } diff --git a/src/core/ns_recover.c b/src/core/ns_recover.c index a0b486fb2..0b406c120 100644 --- a/src/core/ns_recover.c +++ b/src/core/ns_recover.c @@ -115,8 +115,10 @@ class NSRecover : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSRecover()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_RECOVER); } diff --git a/src/core/ns_register.c b/src/core/ns_register.c index e2ef9f02d..1a1d2b2eb 100644 --- a/src/core/ns_register.c +++ b/src/core/ns_register.c @@ -371,8 +371,10 @@ class NSRegister : public Module this->AddCommand(NICKSERV, new CommandNSRegister()); this->AddCommand(NICKSERV, new CommandNSConfirm("CONFIRM", 0, 1)); this->AddCommand(NICKSERV, new CommandNSResend()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_REGISTER); if (NSEmailReg) diff --git a/src/core/ns_release.c b/src/core/ns_release.c index b1c040007..a789a9e0a 100644 --- a/src/core/ns_release.c +++ b/src/core/ns_release.c @@ -97,8 +97,10 @@ class NSRelease : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSRelease()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_RELEASE); } diff --git a/src/core/ns_saset.c b/src/core/ns_saset.c index 9ad4424f4..2545a4060 100644 --- a/src/core/ns_saset.c +++ b/src/core/ns_saset.c @@ -590,8 +590,10 @@ public: this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSSASet()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SASET); } diff --git a/src/core/ns_sendpass.c b/src/core/ns_sendpass.c index 6eb2ec71a..f5fcb1790 100644 --- a/src/core/ns_sendpass.c +++ b/src/core/ns_sendpass.c @@ -100,8 +100,10 @@ class NSSendPass : public Module char tmp_pass[PASSMAX]; if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1)) throw ModuleException("Incompatible with the encryption module being used"); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SENDPASS); } diff --git a/src/core/ns_set.c b/src/core/ns_set.c index 1521ff90d..b2f21e3e6 100644 --- a/src/core/ns_set.c +++ b/src/core/ns_set.c @@ -547,8 +547,10 @@ class NSSet : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSSet()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SET); } diff --git a/src/core/ns_status.c b/src/core/ns_status.c index e8f99fa78..95dd4fe7d 100644 --- a/src/core/ns_status.c +++ b/src/core/ns_status.c @@ -76,8 +76,10 @@ class NSStatus : public Module this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSStatus()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_STATUS); } diff --git a/src/core/ns_suspend.c b/src/core/ns_suspend.c index b7394ff25..2d32d337d 100644 --- a/src/core/ns_suspend.c +++ b/src/core/ns_suspend.c @@ -185,8 +185,10 @@ class NSSuspend : public Module this->AddCommand(NICKSERV, new CommandNSSuspend()); this->AddCommand(NICKSERV, new CommandNSUnSuspend()); + + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_SUSPEND); notice_lang(s_NickServ, u, NICK_HELP_CMD_UNSUSPEND); diff --git a/src/core/ns_update.c b/src/core/ns_update.c index 9b18a4596..b84608d08 100644 --- a/src/core/ns_update.c +++ b/src/core/ns_update.c @@ -58,8 +58,9 @@ class NSUpdate : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(NICKSERV, new CommandNSUpdate()); + ModuleManager::Attach(I_OnNickServHelp, this); } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { notice_lang(s_NickServ, u, NICK_HELP_CMD_UPDATE); } diff --git a/src/core/os_akill.c b/src/core/os_akill.c index 6eb919b8d..9bdc97789 100644 --- a/src/core/os_akill.c +++ b/src/core/os_akill.c @@ -330,8 +330,10 @@ class OSAKill : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSAKill()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_AKILL); } diff --git a/src/core/os_chankill.c b/src/core/os_chankill.c index 6eb9e9456..0d96690b2 100644 --- a/src/core/os_chankill.c +++ b/src/core/os_chankill.c @@ -110,8 +110,10 @@ class OSChanKill : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSChanKill()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANKILL); } diff --git a/src/core/os_chanlist.c b/src/core/os_chanlist.c index e92e4ca8d..4203e53ff 100644 --- a/src/core/os_chanlist.c +++ b/src/core/os_chanlist.c @@ -102,8 +102,10 @@ class OSChanList : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSChanList()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CHANLIST); } diff --git a/src/core/os_clearmodes.c b/src/core/os_clearmodes.c index 5af54d8be..8150ae010 100644 --- a/src/core/os_clearmodes.c +++ b/src/core/os_clearmodes.c @@ -187,8 +187,10 @@ class OSClearModes : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSClearModes()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_CLEARMODES); } diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index 426fac779..f2d2cf8ec 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -142,15 +142,15 @@ class OSDEFCON : public Module throw ModuleException("Invalid configuration settings"); } - Implementation i[] = { I_OnPreUserConnect, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommandRun, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelCreate }; - ModuleManager::Attach(i, this, 8); + Implementation i[] = { I_OnOperServHelp, I_OnPreUserConnect, I_OnChannelModeSet, I_OnChannelModeUnset, I_OnPreCommandRun, I_OnPreCommand, I_OnUserConnect, I_OnChannelModeAdd, I_OnChannelCreate }; + ModuleManager::Attach(i, this, 9); this->AddCommand(OPERSERV, new CommandOSDEFCON()); defconParseModeString(DefConChanModes); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_DEFCON); } diff --git a/src/core/os_global.c b/src/core/os_global.c index f8074687b..bb44ed911 100644 --- a/src/core/os_global.c +++ b/src/core/os_global.c @@ -54,8 +54,10 @@ class OSGlobal : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSGlobal()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_GLOBAL); } diff --git a/src/core/os_help.c b/src/core/os_help.c index 134376576..bbff487f7 100644 --- a/src/core/os_help.c +++ b/src/core/os_help.c @@ -31,7 +31,7 @@ class CommandOSHelp : public Command void OnSyntaxError(User *u) { notice_help(s_OperServ, u, OPER_HELP); - moduleDisplayHelp(s_OperServ, u); + FOREACH_MOD(I_OnOperServHelp, OnOperServHelp(u)); notice_help(s_OperServ, u, OPER_HELP_LOGGED); } }; diff --git a/src/core/os_ignore.c b/src/core/os_ignore.c index 82fd7762e..f841fa0a8 100644 --- a/src/core/os_ignore.c +++ b/src/core/os_ignore.c @@ -139,8 +139,10 @@ class OSIgnore : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSIgnore()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_IGNORE); } diff --git a/src/core/os_jupe.c b/src/core/os_jupe.c index 43dc1f89b..1027d31ca 100644 --- a/src/core/os_jupe.c +++ b/src/core/os_jupe.c @@ -68,8 +68,10 @@ class OSJupe : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSJupe()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_JUPE); } diff --git a/src/core/os_kick.c b/src/core/os_kick.c index f56ccf211..19b95524c 100644 --- a/src/core/os_kick.c +++ b/src/core/os_kick.c @@ -73,8 +73,10 @@ class OSKick : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSKick()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_KICK); } diff --git a/src/core/os_mode.c b/src/core/os_mode.c index 9077fd3f0..616db1690 100644 --- a/src/core/os_mode.c +++ b/src/core/os_mode.c @@ -69,8 +69,10 @@ class OSMode : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSMode()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODE); } diff --git a/src/core/os_modinfo.c b/src/core/os_modinfo.c index 291b37968..594355b3b 100644 --- a/src/core/os_modinfo.c +++ b/src/core/os_modinfo.c @@ -74,8 +74,10 @@ class OSModInfo : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSModInfo()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODINFO); } diff --git a/src/core/os_modlist.c b/src/core/os_modlist.c index e0062d579..f0fd07029 100644 --- a/src/core/os_modlist.c +++ b/src/core/os_modlist.c @@ -178,8 +178,10 @@ class OSModList : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSModList()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLIST); } diff --git a/src/core/os_modload.c b/src/core/os_modload.c index 65287d4e6..0e3b5d3fb 100644 --- a/src/core/os_modload.c +++ b/src/core/os_modload.c @@ -65,8 +65,10 @@ class OSModLoad : public Module this->SetPermanent(true); this->AddCommand(OPERSERV, new CommandOSModLoad()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODLOAD); } diff --git a/src/core/os_modunload.c b/src/core/os_modunload.c index 13b998a34..36a0c48b3 100644 --- a/src/core/os_modunload.c +++ b/src/core/os_modunload.c @@ -67,8 +67,10 @@ class OSModUnLoad : public Module this->SetPermanent(true); this->AddCommand(OPERSERV, new CommandOSModUnLoad()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_MODUNLOAD); } diff --git a/src/core/os_news.c b/src/core/os_news.c index 4ca0e057d..dc6bfaa3c 100644 --- a/src/core/os_news.c +++ b/src/core/os_news.c @@ -489,8 +489,8 @@ class OSNews : public Module this->AddCommand(OPERSERV, new CommandOSOperNews()); this->AddCommand(OPERSERV, new CommandOSRandomNews()); - Implementation i[] = { I_OnUserModeSet, I_OnUserConnect, I_OnSaveDatabase, I_OnPostLoadDatabases }; - ModuleManager::Attach(i, this, 4); + Implementation i[] = { I_OnOperServHelp, I_OnUserModeSet, I_OnUserConnect, I_OnSaveDatabase, I_OnPostLoadDatabases }; + ModuleManager::Attach(i, this, 5); } ~OSNews() @@ -498,7 +498,7 @@ class OSNews : public Module save_news(); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_LOGONNEWS); notice_lang(s_OperServ, u, OPER_HELP_CMD_OPERNEWS); diff --git a/src/core/os_noop.c b/src/core/os_noop.c index 210671760..13fa7767c 100644 --- a/src/core/os_noop.c +++ b/src/core/os_noop.c @@ -81,8 +81,10 @@ class OSNOOP : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSNOOP()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_NOOP); } diff --git a/src/core/os_oline.c b/src/core/os_oline.c index 634eb5327..424ad5867 100644 --- a/src/core/os_oline.c +++ b/src/core/os_oline.c @@ -75,8 +75,10 @@ class OSOLine : public Module if (!ircd->omode) throw ModuleException("Your IRCd does not support OMODE."); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_OLINE); } diff --git a/src/core/os_quit.c b/src/core/os_quit.c index 970b37c49..cd38b4e88 100644 --- a/src/core/os_quit.c +++ b/src/core/os_quit.c @@ -54,8 +54,10 @@ class OSQuit : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSQuit()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_QUIT); } diff --git a/src/core/os_reload.c b/src/core/os_reload.c index 4dc5eb745..b45961718 100644 --- a/src/core/os_reload.c +++ b/src/core/os_reload.c @@ -56,8 +56,10 @@ class OSReload : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSReload()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_RELOAD); } diff --git a/src/core/os_restart.c b/src/core/os_restart.c index c5d27c82a..3784a7697 100644 --- a/src/core/os_restart.c +++ b/src/core/os_restart.c @@ -53,8 +53,10 @@ class OSRestart : public Module this->SetVersion("$Id$"); this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSRestart()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_RESTART); } diff --git a/src/core/os_session.c b/src/core/os_session.c index 3c8d3963f..c484f35d9 100644 --- a/src/core/os_session.c +++ b/src/core/os_session.c @@ -461,8 +461,10 @@ class OSSession : public Module this->AddCommand(OPERSERV, new CommandOSSession()); this->AddCommand(OPERSERV, new CommandOSException()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SESSION); notice_lang(s_OperServ, u, OPER_HELP_CMD_EXCEPTION); diff --git a/src/core/os_set.c b/src/core/os_set.c index a48ea96f9..b1e047ac8 100644 --- a/src/core/os_set.c +++ b/src/core/os_set.c @@ -300,8 +300,10 @@ class OSSet : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSSet()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SET); } diff --git a/src/core/os_sgline.c b/src/core/os_sgline.c index bf1ee4112..8feb6682e 100644 --- a/src/core/os_sgline.c +++ b/src/core/os_sgline.c @@ -332,8 +332,10 @@ class OSSGLine : public Module if (!ircd->sgline) throw ModuleException("Your IRCd does not support SGLine"); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SGLINE); } diff --git a/src/core/os_shutdown.c b/src/core/os_shutdown.c index 540d3121c..6c5d97199 100644 --- a/src/core/os_shutdown.c +++ b/src/core/os_shutdown.c @@ -55,8 +55,10 @@ class OSShutdown : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSShutdown()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SHUTDOWN); } diff --git a/src/core/os_sqline.c b/src/core/os_sqline.c index da652bd42..09e6252a4 100644 --- a/src/core/os_sqline.c +++ b/src/core/os_sqline.c @@ -318,8 +318,10 @@ class OSSQLine : public Module if (!ircd->sqline) throw ModuleException("Your IRCd does not support QLines."); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SQLINE); } diff --git a/src/core/os_staff.c b/src/core/os_staff.c index a705ba9f0..682dc93c6 100644 --- a/src/core/os_staff.c +++ b/src/core/os_staff.c @@ -84,8 +84,10 @@ class OSStaff : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSStaff()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_STAFF); } diff --git a/src/core/os_stats.c b/src/core/os_stats.c index 67bac0fa0..3e2cf0472 100644 --- a/src/core/os_stats.c +++ b/src/core/os_stats.c @@ -314,8 +314,10 @@ class OSStats : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSStats()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_STATS); } diff --git a/src/core/os_svsnick.c b/src/core/os_svsnick.c index 19718a6e4..9ddf700cc 100644 --- a/src/core/os_svsnick.c +++ b/src/core/os_svsnick.c @@ -94,8 +94,10 @@ class OSSVSNick : public Module if (!ircd->svsnick) throw ModuleException("Your IRCd does not support SVSNICK"); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SVSNICK); } diff --git a/src/core/os_szline.c b/src/core/os_szline.c index 3b65a017e..5d33db350 100644 --- a/src/core/os_szline.c +++ b/src/core/os_szline.c @@ -317,8 +317,10 @@ class OSSZLine : public Module if (!ircd->szline) throw ModuleException("Your IRCd does not support ZLINEs"); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_SZLINE); } diff --git a/src/core/os_umode.c b/src/core/os_umode.c index 48f859a68..dce06872f 100644 --- a/src/core/os_umode.c +++ b/src/core/os_umode.c @@ -80,8 +80,10 @@ class OSUMode : public Module if (!ircd->umode) throw ModuleException("Your IRCd does not support setting umodes"); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_UMODE); } diff --git a/src/core/os_update.c b/src/core/os_update.c index f447cf199..94395a88c 100644 --- a/src/core/os_update.c +++ b/src/core/os_update.c @@ -46,8 +46,10 @@ class OSUpdate : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSUpdate()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_UPDATE); } diff --git a/src/core/os_userlist.c b/src/core/os_userlist.c index d5abff8b3..a73668f4b 100644 --- a/src/core/os_userlist.c +++ b/src/core/os_userlist.c @@ -105,8 +105,10 @@ class OSUserList : public Module this->SetType(CORE); this->AddCommand(OPERSERV, new CommandOSUserList()); + + ModuleManager::Attach(I_OnOperServHelp, this); } - void OperServHelp(User *u) + void OnOperServHelp(User *u) { notice_lang(s_OperServ, u, OPER_HELP_CMD_USERLIST); } diff --git a/src/modules.c b/src/modules.c index ee8dae409..3482220ae 100644 --- a/src/modules.c +++ b/src/modules.c @@ -646,39 +646,7 @@ bool Module::DelCallBack(Timer *t) return false; } -/** - * Display any extra module help for the given service. - * @param services which services is help being dispalyed for? - * @param u which user is requesting the help - **/ -void moduleDisplayHelp(const char *service, User * u) -{ - int idx; - ModuleHash *current = NULL; - - if (!service) - return; - - for (idx = 0; idx != MAX_CMD_HASH; idx++) { - for (current = MODULE_HASH[idx]; current; current = current->next) { - if (s_NickServ && !strcmp(s_NickServ, service)) - current->m->NickServHelp(u); - else if (s_ChanServ && !strcmp(s_ChanServ, service)) - current->m->ChanServHelp(u); - else if (s_MemoServ && !strcmp(s_MemoServ, service)) - current->m->MemoServHelp(u); - else if (s_BotServ && !strcmp(s_BotServ, service)) - current->m->BotServHelp(u); - else if (s_OperServ && !strcmp(s_OperServ, service)) - current->m->OperServHelp(u); - else if (s_HostServ && !strcmp(s_HostServ, service)) - current->m->HostServHelp(u); - } - } -} - -/** - * Check the current version of anope against a given version number + /* Check the current version of anope against a given version number * Specifiying -1 for minor,patch or build * @param major The major version of anope, the first part of the verison number * @param minor The minor version of anope, the second part of the version number diff --git a/src/modules/cs_appendtopic.c b/src/modules/cs_appendtopic.c index c67b68b4e..d5b32fe2a 100644 --- a/src/modules/cs_appendtopic.c +++ b/src/modules/cs_appendtopic.c @@ -222,8 +222,10 @@ class CSAppendTopic : public Module this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt); this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru); this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { this->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP); } diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index 47b90db45..47fdedc07 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -470,8 +470,10 @@ class CSEnforce : public Module this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt); this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru); this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { this->NoticeLang(s_ChanServ, u, LNG_CHAN_HELP); } diff --git a/src/modules/cs_tban.c b/src/modules/cs_tban.c index e0ab66db4..9f8f2a2db 100644 --- a/src/modules/cs_tban.c +++ b/src/modules/cs_tban.c @@ -154,8 +154,10 @@ class CSTBan : public Module this->InsertLanguage(LANG_PT, LANG_NUM_STRINGS, langtable_pt); this->InsertLanguage(LANG_RU, LANG_NUM_STRINGS, langtable_ru); this->InsertLanguage(LANG_IT, LANG_NUM_STRINGS, langtable_it); + + ModuleManager::Attach(I_OnChanServHelp, this); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { this->NoticeLang(s_ChanServ, u, TBAN_HELP); } diff --git a/src/modules/hs_request.c b/src/modules/hs_request.c index 779629521..0466f95fe 100644 --- a/src/modules/hs_request.c +++ b/src/modules/hs_request.c @@ -678,6 +678,8 @@ class HSRequest : public Module this->InsertLanguage(LANG_PT, LNG_NUM_STRINGS, langtable_pt); this->InsertLanguage(LANG_RU, LNG_NUM_STRINGS, langtable_ru); this->InsertLanguage(LANG_IT, LNG_NUM_STRINGS, langtable_it); + + ModuleManager::Attach(I_OnHostServHelp, this); } ~HSRequest() @@ -765,7 +767,7 @@ class HSRequest : public Module ModuleDatabaseBackup(HSREQ_DEFAULT_DBNAME); } - void HostServHelp(User *u) + void OnHostServHelp(User *u) { this->NoticeLang(s_HostServ, u, LNG_HELP); this->NoticeLang(s_HostServ, u, LNG_HELP_SETTER); diff --git a/src/modules/os_info.c b/src/modules/os_info.c index 10bf6a557..6298a7744 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -447,6 +447,9 @@ class OSInfo : public Module this->InsertLanguage(LANG_PT, LANG_NUM_STRINGS, langtable_pt); this->InsertLanguage(LANG_RU, LANG_NUM_STRINGS, langtable_ru); this->InsertLanguage(LANG_IT, LANG_NUM_STRINGS, langtable_it); + + Implementation i[] = { I_OnNickServHelp, I_OnChanServHelp }; + ModuleManager::Attach(i, this, 2); } ~OSInfo() @@ -603,12 +606,12 @@ class OSInfo : public Module } } - void NickServHelp(User *u) + void OnNickServHelp(User *u) { this->NoticeLang(s_NickServ, u, OINFO_HELP_CMD); } - void ChanServHelp(User *u) + void OnChanServHelp(User *u) { this->NoticeLang(s_ChanServ, u, OCINFO_HELP_CMD); } |