diff options
| author | Adam <Adam@anope.org> | 2014-12-10 01:29:18 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-12-10 01:29:18 -0500 |
| commit | 3e5a5e1c669f6027b897f7358d45f92e1552f746 (patch) | |
| tree | 5be9d41890d79eb0472f374b3f2a0ab9b36b1941 | |
| parent | 42238034490fb5479d787bd1695750387d508200 (diff) | |
Use a triat class for event names instead of having to manually give them places, which is much less error prone
116 files changed, 508 insertions, 365 deletions
diff --git a/include/event.h b/include/event.h index a8c8999cd..1cc39a67e 100644 --- a/include/event.h +++ b/include/event.h @@ -59,6 +59,9 @@ struct Caller<EventHandler, Func, EventReturn, Args...> } }; +template<typename T> +struct EventName; + template<typename EventHandler> class EventHook; @@ -69,7 +72,7 @@ class EventHandlers : public Service friend class EventHook<EventHandler>; public: - EventHandlers(Module *o, const Anope::string &ename) : Service(o, "EventHandlers", ename) + EventHandlers(Module *o) : Service(o, "EventHandlers", EventName<EventHandler>::name) { } @@ -85,7 +88,7 @@ class EventHandlersReference { ServiceReference<EventHandlers<EventHandler>> ref; public: - EventHandlersReference(const Anope::string &name) : ref("EventHandlers", name) { } + EventHandlersReference() : ref("EventHandlers", EventName<EventHandler>::name) { } explicit operator bool() { @@ -131,7 +134,7 @@ class EventHook : public EventHandler } priority; - EventHook(const Anope::string &name, Priority p = Priority::LAST) : handlers(this, name), priority(p) + EventHook(Priority p = Priority::LAST) : handlers(this, EventName<EventHandler>::name), priority(p) { handlers.Check(); } @@ -1013,3 +1016,88 @@ namespace Event extern CoreExport EventHandlers<SerializeEvents> OnSerialize; } +template<> struct EventName<Event::PreUserKicked> { static constexpr const char *const name = "OnPreUserKicked"; }; +template<> struct EventName<Event::UserKicked> { static constexpr const char *const name = "OnUserKicked"; }; +template<> struct EventName<Event::PreBotAssign> { static constexpr const char *const name = "OnPreBotAssign"; }; +template<> struct EventName<Event::BotAssign> { static constexpr const char *const name = "OnBotAssign"; }; +template<> struct EventName<Event::BotUnAssign> { static constexpr const char *const name = "OnBotUnAssign"; }; +template<> struct EventName<Event::UserConnect> { static constexpr const char *const name = "OnUserConnect"; }; +template<> struct EventName<Event::NewServer> { static constexpr const char *const name = "OnNewServer"; }; +template<> struct EventName<Event::UserNickChange> { static constexpr const char *const name = "OnUserNickChange"; }; +template<> struct EventName<Event::PreCommand> { static constexpr const char *const name = "OnPreCommand"; }; +template<> struct EventName<Event::PostCommand> { static constexpr const char *const name = "OnPostCommand"; }; +template<> struct EventName<Event::SaveDatabase> { static constexpr const char *const name = "OnSaveDatabase"; }; +template<> struct EventName<Event::LoadDatabase> { static constexpr const char *const name = "OnLoadDatabase"; }; +template<> struct EventName<Event::Encrypt> { static constexpr const char *const name = "OnEncrypt"; }; +template<> struct EventName<Event::Decrypt> { static constexpr const char *const name = "OnDecrypt"; }; +template<> struct EventName<Event::CreateBot> { static constexpr const char *const name = "OnCreateBot"; }; +template<> struct EventName<Event::DelBot> { static constexpr const char *const name = "OnDelBot"; }; +template<> struct EventName<Event::PrePartChannel> { static constexpr const char *const name = "OnPrePartChannel"; }; +template<> struct EventName<Event::PartChannel> { static constexpr const char *const name = "OnPartChannel"; }; +template<> struct EventName<Event::LeaveChannel> { static constexpr const char *const name = "OnLeaveChannel"; }; +template<> struct EventName<Event::JoinChannel> { static constexpr const char *const name = "OnJoinChannel"; }; +template<> struct EventName<Event::TopicUpdated> { static constexpr const char *const name = "OnTopicUpdated"; }; +template<> struct EventName<Event::PreServerConnect> { static constexpr const char *const name = "OnPreServerConnect"; }; +template<> struct EventName<Event::ServerConnect> { static constexpr const char *const name = "OnServerConnect"; }; +template<> struct EventName<Event::PreUplinkSync> { static constexpr const char *const name = "OnPreUplinkSync"; }; +template<> struct EventName<Event::ServerDisconnect> { static constexpr const char *const name = "OnServerDisconnect"; }; +template<> struct EventName<Event::Restart> { static constexpr const char *const name = "OnRestart"; }; +template<> struct EventName<Event::Shutdown> { static constexpr const char *const name = "OnShutdown"; }; +template<> struct EventName<Event::AddXLine> { static constexpr const char *const name = "OnAddXLine"; }; +template<> struct EventName<Event::DelXLine> { static constexpr const char *const name = "OnDelXLine"; }; +template<> struct EventName<Event::IsServicesOperEvent> { static constexpr const char *const name = "OnIsServicesOper"; }; +template<> struct EventName<Event::ServerQuit> { static constexpr const char *const name = "OnServerQuit"; }; +template<> struct EventName<Event::UserQuit> { static constexpr const char *const name = "OnUserQuit"; }; +template<> struct EventName<Event::PreUserLogoff> { static constexpr const char *const name = "OnPreUserLogoff"; }; +template<> struct EventName<Event::PostUserLogoff> { static constexpr const char *const name = "OnPostUserLogoff"; }; +template<> struct EventName<Event::AccessDel> { static constexpr const char *const name = "OnAccessDel"; }; +template<> struct EventName<Event::AccessAdd> { static constexpr const char *const name = "OnAccessAdd"; }; +template<> struct EventName<Event::AccessClear> { static constexpr const char *const name = "OnAccessClear"; }; +template<> struct EventName<Event::ChanRegistered> { static constexpr const char *const name = "OnChanRegistered"; }; +template<> struct EventName<Event::CreateChan> { static constexpr const char *const name = "OnCreateChan"; }; +template<> struct EventName<Event::DelChan> { static constexpr const char *const name = "OnDelChan"; }; +template<> struct EventName<Event::ChannelCreate> { static constexpr const char *const name = "OnChannelCreate"; }; +template<> struct EventName<Event::ChannelDelete> { static constexpr const char *const name = "OnChannelDelete"; }; +template<> struct EventName<Event::CheckKick> { static constexpr const char *const name = "OnCheckKick"; }; +template<> struct EventName<Event::CheckPriv> { static constexpr const char *const name = "OnCheckPriv"; }; +template<> struct EventName<Event::GroupCheckPriv> { static constexpr const char *const name = "OnGroupCheckPriv"; }; +template<> struct EventName<Event::NickIdentify> { static constexpr const char *const name = "OnNickIdentify"; }; +template<> struct EventName<Event::UserLogin> { static constexpr const char *const name = "OnUserLogin"; }; +template<> struct EventName<Event::NickLogout> { static constexpr const char *const name = "OnNickLogout"; }; +template<> struct EventName<Event::DelNick> { static constexpr const char *const name = "OnDelNick"; }; +template<> struct EventName<Event::NickCoreCreate> { static constexpr const char *const name = "OnNickCoreCreate"; }; +template<> struct EventName<Event::DelCore> { static constexpr const char *const name = "OnDelCore"; }; +template<> struct EventName<Event::ChangeCoreDisplay> { static constexpr const char *const name = "OnChangeCoreDisplay"; }; +template<> struct EventName<Event::NickClearAccess> { static constexpr const char *const name = "OnNickClearAccess"; }; +template<> struct EventName<Event::NickAddAccess> { static constexpr const char *const name = "OnNickAddAccess"; }; +template<> struct EventName<Event::NickEraseAccess> { static constexpr const char *const name = "OnNickEraseAccess"; }; +template<> struct EventName<Event::CheckAuthentication> { static constexpr const char *const name = "OnCheckAuthentication"; }; +template<> struct EventName<Event::Fingerprint> { static constexpr const char *const name = "OnFingerprint"; }; +template<> struct EventName<Event::UserAway> { static constexpr const char *const name = "OnUserAway"; }; +template<> struct EventName<Event::Invite> { static constexpr const char *const name = "OnInvite"; }; +template<> struct EventName<Event::SetVhost> { static constexpr const char *const name = "OnSetVhost"; }; +template<> struct EventName<Event::SetDisplayedHost> { static constexpr const char *const name = "OnSetDisplayedHost"; }; +template<> struct EventName<Event::ChannelModeSet> { static constexpr const char *const name = "OnChannelModeSet"; }; +template<> struct EventName<Event::ChannelModeUnset> { static constexpr const char *const name = "OnChannelModeUnset"; }; +template<> struct EventName<Event::UserModeSet> { static constexpr const char *const name = "OnUserModeSet"; }; +template<> struct EventName<Event::UserModeUnset> { static constexpr const char *const name = "OnUserModeUnset"; }; +template<> struct EventName<Event::ChannelModeAdd> { static constexpr const char *const name = "OnChannelModeAdd"; }; +template<> struct EventName<Event::UserModeAdd> { static constexpr const char *const name = "OnUserModeAdd"; }; +template<> struct EventName<Event::ModuleLoad> { static constexpr const char *const name = "OnModuleLoad"; }; +template<> struct EventName<Event::ModuleUnload> { static constexpr const char *const name = "OnModuleUnload"; }; +template<> struct EventName<Event::ServerSync> { static constexpr const char *const name = "OnServerSync"; }; +template<> struct EventName<Event::UplinkSync> { static constexpr const char *const name = "OnUplinkSync"; }; +template<> struct EventName<Event::BotPrivmsg> { static constexpr const char *const name = "OnBotPrivmsg"; }; +template<> struct EventName<Event::BotNotice> { static constexpr const char *const name = "OnBotNotice"; }; +template<> struct EventName<Event::Privmsg> { static constexpr const char *const name = "OnPrivmsg"; }; +template<> struct EventName<Event::Log> { static constexpr const char *const name = "OnLog"; }; +template<> struct EventName<Event::LogMessage> { static constexpr const char *const name = "OnLogMessage"; }; +template<> struct EventName<Event::CheckModes> { static constexpr const char *const name = "OnCheckModes"; }; +template<> struct EventName<Event::ChannelSync> { static constexpr const char *const name = "OnChannelSync"; }; +template<> struct EventName<Event::SetCorrectModes> { static constexpr const char *const name = "OnSetCorrectModes"; }; +template<> struct EventName<Event::Message> { static constexpr const char *const name = "OnMessage"; }; +template<> struct EventName<Event::CanSet> { static constexpr const char *const name = "OnCanSet"; }; +template<> struct EventName<Event::CheckDelete> { static constexpr const char *const name = "OnCheckDelete"; }; +template<> struct EventName<Event::ExpireTick> { static constexpr const char *const name = "OnExpireTick"; }; +template<> struct EventName<Event::SerializeEvents> { static constexpr const char *const name = "OnSerialize"; }; + diff --git a/include/modules/bs_badwords.h b/include/modules/bs_badwords.h index df42af6ec..87986ee62 100644 --- a/include/modules/bs_badwords.h +++ b/include/modules/bs_badwords.h @@ -99,3 +99,4 @@ namespace Event }; } +template<> struct EventName<Event::BadWordEvents> { static constexpr const char *const name = "Badwords"; }; diff --git a/include/modules/bs_bot.h b/include/modules/bs_bot.h index f66d57031..fe6534309 100644 --- a/include/modules/bs_bot.h +++ b/include/modules/bs_bot.h @@ -32,3 +32,7 @@ namespace Event virtual void OnBotDelete(ServiceBot *bi) anope_abstract; }; } + +template<> struct EventName<Event::BotCreate> { static constexpr const char *const name = "OnBotCreate"; }; +template<> struct EventName<Event::BotChange> { static constexpr const char *const name = "OnBotChange"; }; +template<> struct EventName<Event::BotDelete> { static constexpr const char *const name = "OnBotDelete"; }; diff --git a/include/modules/bs_info.h b/include/modules/bs_info.h index 606888f4c..1ebd58c89 100644 --- a/include/modules/bs_info.h +++ b/include/modules/bs_info.h @@ -18,3 +18,4 @@ namespace Event extern CoreExport EventHandlers<ServiceBotEvent> OnServiceBot; } +template<> struct EventName<Event::ServiceBotEvent> { static constexpr const char *const name = "OnServiceBot"; }; diff --git a/include/modules/bs_kick.h b/include/modules/bs_kick.h index 4fe234dd0..1346d7427 100644 --- a/include/modules/bs_kick.h +++ b/include/modules/bs_kick.h @@ -128,3 +128,5 @@ namespace Event }; } +template<> struct EventName<Event::BotBan> { static constexpr const char *const name = "OnBotBan"; }; + diff --git a/include/modules/chanserv.h b/include/modules/chanserv.h index 9985f25dc..a6f741c1b 100644 --- a/include/modules/chanserv.h +++ b/include/modules/chanserv.h @@ -164,7 +164,7 @@ namespace ChanServ */ virtual void OnPreChanExpire(Channel *ci, bool &expire) anope_abstract; }; - static EventHandlersReference<PreChanExpire> OnPreChanExpire("OnPreChanExpire"); + static EventHandlersReference<PreChanExpire> OnPreChanExpire; struct CoreExport ChanExpire : Events { @@ -173,7 +173,7 @@ namespace ChanServ */ virtual void OnChanExpire(Channel *ci) anope_abstract; }; - static EventHandlersReference<ChanExpire> OnChanExpire("OnChanExpire"); + static EventHandlersReference<ChanExpire> OnChanExpire; } /* It matters that Base is here before Extensible (it is inherited by Serializable) @@ -734,3 +734,6 @@ namespace ChanServ } }; } + +template<> struct EventName<ChanServ::Event::PreChanExpire> { static constexpr const char *const name = "OnPreChanExpire"; }; +template<> struct EventName<ChanServ::Event::ChanExpire> { static constexpr const char *const name = "OnChanExpire"; }; diff --git a/include/modules/cs_access.h b/include/modules/cs_access.h index b56996ede..54eb3f353 100644 --- a/include/modules/cs_access.h +++ b/include/modules/cs_access.h @@ -24,3 +24,5 @@ namespace Event virtual void OnLevelChange(CommandSource &source, ChanServ::Channel *ci, const Anope::string &priv, int16_t what) anope_abstract; }; } + +template<> struct EventName<Event::LevelChange> { static constexpr const char *const name = "OnLevelChange"; }; diff --git a/include/modules/cs_akick.h b/include/modules/cs_akick.h index a5c050e51..966dac15b 100644 --- a/include/modules/cs_akick.h +++ b/include/modules/cs_akick.h @@ -60,3 +60,5 @@ namespace Event virtual void OnAkickDel(CommandSource &source, ChanServ::Channel *ci, const AutoKick *ak) anope_abstract; }; } + +template<> struct EventName<Event::Akick> { static constexpr const char *const name = "Akick"; }; diff --git a/include/modules/cs_drop.h b/include/modules/cs_drop.h index 49247b3cb..db231059b 100644 --- a/include/modules/cs_drop.h +++ b/include/modules/cs_drop.h @@ -18,3 +18,5 @@ namespace Event virtual EventReturn OnChanDrop(CommandSource &source, ChanServ::Channel *ci) anope_abstract; }; } + +template<> struct EventName<Event::ChanDrop> { static constexpr const char *const name = "OnChanDrop"; }; diff --git a/include/modules/cs_info.h b/include/modules/cs_info.h index 7b19abd19..f80e3daf2 100644 --- a/include/modules/cs_info.h +++ b/include/modules/cs_info.h @@ -21,3 +21,4 @@ namespace Event }; } +template<> struct EventName<Event::ChanInfo> { static constexpr const char *const name = "OnChanInfo"; }; diff --git a/include/modules/cs_mode.h b/include/modules/cs_mode.h index a27197533..4d5f9dd2f 100644 --- a/include/modules/cs_mode.h +++ b/include/modules/cs_mode.h @@ -120,3 +120,4 @@ namespace Event }; } +template<> struct EventName<Event::MLockEvents> { static constexpr const char *const name = "MLock"; }; diff --git a/include/modules/cs_set.h b/include/modules/cs_set.h index 355459f7c..a0e81c888 100644 --- a/include/modules/cs_set.h +++ b/include/modules/cs_set.h @@ -20,6 +20,7 @@ namespace Event */ virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChanServ::Channel *ci, const Anope::string &setting) anope_abstract; }; - static EventHandlersReference<SetChannelOption> OnSetChannelOption("OnSetChannelOption"); + static EventHandlersReference<SetChannelOption> OnSetChannelOption; } +template<> struct EventName<Event::SetChannelOption> { static constexpr const char *const name = "OnSetChannelOption"; }; diff --git a/include/modules/cs_suspend.h b/include/modules/cs_suspend.h index 6c561b637..27187ea09 100644 --- a/include/modules/cs_suspend.h +++ b/include/modules/cs_suspend.h @@ -49,3 +49,5 @@ namespace Event extern CoreExport EventHandlers<ChanUnsuspend> OnChanUnsuspend; } +template<> struct EventName<Event::ChanSuspend> { static constexpr const char *const name = "OnChanSuspend"; }; +template<> struct EventName<Event::ChanUnsuspend> { static constexpr const char *const name = "OnChanUnsuspend"; }; diff --git a/include/modules/dns.h b/include/modules/dns.h index 7a0a587fa..f1ee94f87 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -188,9 +188,10 @@ namespace Event */ virtual void OnDnsRequest(DNS::Query &req, DNS::Query *reply) anope_abstract; }; - static EventHandlersReference<DnsRequest> OnDnsRequest("OnDnsRequest"); + static EventHandlersReference<DnsRequest> OnDnsRequest; } +template<> struct EventName<Event::DnsRequest> { static constexpr const char *const name = "OnDnsRequest"; }; #endif // DNS_H diff --git a/include/modules/fantasy.h b/include/modules/fantasy.h index bb13b959d..1bdd8afdc 100644 --- a/include/modules/fantasy.h +++ b/include/modules/fantasy.h @@ -33,3 +33,6 @@ namespace Event virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChanServ::Channel *ci, const std::vector<Anope::string> ¶ms) anope_abstract; }; } + +template<> struct EventName<Event::BotFantasy> { static constexpr const char *const name = "OnBotFantasy"; }; +template<> struct EventName<Event::BotNoFantasyAccess> { static constexpr const char *const name = "OnBotNoFantasyAccess"; }; diff --git a/include/modules/help.h b/include/modules/help.h index 333e5f9c8..df81aecbf 100644 --- a/include/modules/help.h +++ b/include/modules/help.h @@ -25,3 +25,5 @@ namespace Event virtual void OnPostHelp(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_abstract; }; } + +template<> struct EventName<Event::Help> { static constexpr const char *const name = "Help"; }; diff --git a/include/modules/hs_del.h b/include/modules/hs_del.h index fdec23b21..9b2ea39ef 100644 --- a/include/modules/hs_del.h +++ b/include/modules/hs_del.h @@ -16,3 +16,5 @@ namespace Event virtual void OnDeleteVhost(NickServ::Nick *na) anope_abstract; }; } + +template<> struct EventName<Event::DeleteVhost> { static constexpr const char *const name = "OnDeleteVhost"; }; diff --git a/include/modules/memoserv.h b/include/modules/memoserv.h index 9a209e27f..b7d49ad3a 100644 --- a/include/modules/memoserv.h +++ b/include/modules/memoserv.h @@ -61,7 +61,7 @@ namespace MemoServ */ virtual void OnMemoSend(const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) anope_abstract; }; - static EventHandlersReference<MemoSend> OnMemoSend("OnMemoSend"); + static EventHandlersReference<MemoSend> OnMemoSend; struct CoreExport MemoDel : Events { @@ -72,14 +72,14 @@ namespace MemoServ */ virtual void OnMemoDel(const Anope::string &target, MemoInfo *mi, const Memo *m) anope_abstract; }; - static EventHandlersReference<MemoDel> OnMemoDel("OnMemoDel"); + static EventHandlersReference<MemoDel> OnMemoDel; } class Memo : public Serialize::Object { protected: using Serialize::Object::Object; -// Memo() : Serialize::Object("Memo") { } + public: virtual MemoInfo *GetMemoInfo() anope_abstract; virtual void SetMemoInfo(MemoInfo *) anope_abstract; @@ -109,8 +109,7 @@ namespace MemoServ { protected: using Serialize::Object::Object; - //using MemoInfo::MemoInfo; - //MemoInfo() : Serialize::Object("MemoInfo") { } + public: virtual Memo *GetMemo(unsigned index) anope_abstract; @@ -148,3 +147,6 @@ namespace MemoServ static Serialize::TypeReference<Ignore> ignore("MemoIgnore"); } + +template<> struct EventName<MemoServ::Event::MemoSend> { static constexpr const char *const name = "OnMemoSend"; }; +template<> struct EventName<MemoServ::Event::MemoDel> { static constexpr const char *const name = "OnMemoDel"; }; diff --git a/include/modules/nickserv.h b/include/modules/nickserv.h index 84ff39520..a6921cf2e 100644 --- a/include/modules/nickserv.h +++ b/include/modules/nickserv.h @@ -67,7 +67,7 @@ namespace NickServ */ virtual void OnPreNickExpire(Nick *na, bool &expire) anope_abstract; }; - static EventHandlersReference<PreNickExpire> OnPreNickExpire("OnPreNickExpire"); + static EventHandlersReference<PreNickExpire> OnPreNickExpire; struct CoreExport NickExpire : Events { @@ -76,7 +76,7 @@ namespace NickServ */ virtual void OnNickExpire(Nick *na) anope_abstract; }; - static EventHandlersReference<NickExpire> OnNickExpire("OnNickExpire"); + static EventHandlersReference<NickExpire> OnNickExpire; struct CoreExport NickRegister : Events { @@ -87,7 +87,7 @@ namespace NickServ */ virtual void OnNickRegister(User *user, Nick *na, const Anope::string &password) anope_abstract; }; - static EventHandlersReference<NickRegister> OnNickRegister("OnNickRegister"); + static EventHandlersReference<NickRegister> OnNickRegister; struct CoreExport NickValidate : Events { @@ -99,7 +99,7 @@ namespace NickServ */ virtual EventReturn OnNickValidate(User *u, Nick *na) anope_abstract; }; - static EventHandlersReference<NickValidate> OnNickValidate("OnNickValidate"); + static EventHandlersReference<NickValidate> OnNickValidate; } /* A registered nickname. @@ -293,3 +293,8 @@ namespace NickServ static Serialize::TypeReference<Mode> mode("NSKeepMode"); } + +template<> struct EventName<NickServ::Event::PreNickExpire> { static constexpr const char *const name = "OnPreNickExpire"; }; +template<> struct EventName<NickServ::Event::NickExpire> { static constexpr const char *const name = "OnNickExpire"; }; +template<> struct EventName<NickServ::Event::NickRegister> { static constexpr const char *const name = "OnNickRegister"; }; +template<> struct EventName<NickServ::Event::NickValidate> { static constexpr const char *const name = "OnNickValidate"; }; diff --git a/include/modules/ns_cert.h b/include/modules/ns_cert.h index 994f0378e..be75fb9bf 100644 --- a/include/modules/ns_cert.h +++ b/include/modules/ns_cert.h @@ -62,3 +62,5 @@ namespace Event }; } + +template<> struct EventName<Event::NickCertEvents> { static constexpr const char *const name = "OnNickCert"; }; diff --git a/include/modules/ns_drop.h b/include/modules/ns_drop.h index 9217a924c..bae9d77b6 100644 --- a/include/modules/ns_drop.h +++ b/include/modules/ns_drop.h @@ -19,3 +19,4 @@ namespace Event extern CoreExport EventHandlers<NickDrop> OnNickDrop; } +template<> struct EventName<Event::NickDrop> { static constexpr const char *const name = "OnNickDrop"; }; diff --git a/include/modules/ns_group.h b/include/modules/ns_group.h index a254c4412..caa568a9e 100644 --- a/include/modules/ns_group.h +++ b/include/modules/ns_group.h @@ -18,3 +18,5 @@ namespace Event virtual void OnNickGroup(User *u, NickServ::Nick *target) anope_abstract; }; } + +template<> struct EventName<Event::NickGroup> { static constexpr const char *const name = "OnNickGroup"; }; diff --git a/include/modules/ns_info.h b/include/modules/ns_info.h index dd593ce59..e816cc356 100644 --- a/include/modules/ns_info.h +++ b/include/modules/ns_info.h @@ -20,3 +20,5 @@ namespace Event virtual void OnNickInfo(CommandSource &source, NickServ::Nick *na, InfoFormatter &info, bool show_hidden) anope_abstract; }; } + +template<> struct EventName<Event::NickInfo> { static constexpr const char *const name = "OnNickInfo"; }; diff --git a/include/modules/ns_set.h b/include/modules/ns_set.h index b958b4cf5..c6b86032b 100644 --- a/include/modules/ns_set.h +++ b/include/modules/ns_set.h @@ -20,5 +20,7 @@ namespace Event */ virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickServ::Account *nc, const Anope::string &setting) anope_abstract; }; - static EventHandlersReference<SetNickOption> OnSetNickOption("OnSetNickOption"); + static EventHandlersReference<SetNickOption> OnSetNickOption; } + +template<> struct EventName<Event::SetNickOption> { static constexpr const char *const name = "OnSetNickOption"; }; diff --git a/include/modules/ns_suspend.h b/include/modules/ns_suspend.h index b985cb218..fcfc0265d 100644 --- a/include/modules/ns_suspend.h +++ b/include/modules/ns_suspend.h @@ -40,12 +40,14 @@ namespace Event virtual void OnNickSuspend(NickServ::Nick *na) anope_abstract; }; - struct CoreExport NickUnsuspended : Events + struct CoreExport NickUnsuspend : Events { /** Called when a nick is unsuspneded * @param na The nick alias */ - virtual void OnNickUnsuspended(NickServ::Nick *na) anope_abstract; + virtual void OnNickUnsuspend(NickServ::Nick *na) anope_abstract; }; } +template<> struct EventName<Event::NickSuspend> { static constexpr const char *const name = "OnNickSuspend"; }; +template<> struct EventName<Event::NickUnsuspend> { static constexpr const char *const name = "OnNickUnsuspend"; }; diff --git a/include/modules/ns_update.h b/include/modules/ns_update.h index d5d01320a..ce75c33ac 100644 --- a/include/modules/ns_update.h +++ b/include/modules/ns_update.h @@ -18,3 +18,4 @@ namespace Event }; } +template<> struct EventName<Event::NickUpdate> { static constexpr const char *const name = "OnNickUpdate"; }; diff --git a/include/modules/os_defcon.h b/include/modules/os_defcon.h index 81b220eb3..f980d5008 100644 --- a/include/modules/os_defcon.h +++ b/include/modules/os_defcon.h @@ -18,3 +18,4 @@ namespace Event }; } +template<> struct EventName<Event::DefconLevel> { static constexpr const char *const name = "OnDefconLevel"; }; diff --git a/include/modules/os_session.h b/include/modules/os_session.h index c6af4fb03..b9afd196e 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -74,3 +74,4 @@ namespace Event }; } +template<> struct EventName<Event::Exception> { static constexpr const char *const name = "Exception"; }; diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp index 81559ea86..2e26319b6 100644 --- a/modules/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -14,7 +14,7 @@ class BSAutoAssign : public Module { public: BSAutoAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChanRegistered>("OnChanRegistered") + , EventHook<Event::ChanRegistered>() { } diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 90f6f80cf..350aa9c00 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -227,8 +227,8 @@ class BSAssign : public Module public: BSAssign(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::Invite>("OnInvite") - , EventHook<Event::ServiceBotEvent>("OnServiceBotEvent") + , EventHook<Event::Invite>() + , EventHook<Event::ServiceBotEvent>() , nobot(this, botinfo, "BS_NOBOT") diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index 744f625e1..22488a1c0 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -455,7 +455,7 @@ class BSBadwords : public Module BSBadwords(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandbsbadwords(this) , badwords(this) - , events(this, "Badwords") + , events(this) , bwtype(this) { bwevents = &events; diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index 2e9d5980c..c67c5d168 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -275,7 +275,10 @@ class CommandBSBot : public Command } public: - CommandBSBot(Module *creator) : Command(creator, "botserv/bot", 1, 6), OnBotCreate(creator, "OnBotCreate"), OnBotChange(creator, "OnBotChange"), OnBotDelete(creator, "OnBotDelete") + CommandBSBot(Module *creator) : Command(creator, "botserv/bot", 1, 6) + , OnBotCreate(creator) + , OnBotChange(creator) + , OnBotDelete(creator) { this->SetDesc(_("Maintains network bot list")); this->SetSyntax(_("\002ADD \037nicknae\037 \037username\037 \037hostname\037 \037realname\037\002")); diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index 7b100bc41..6d74c308e 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -106,7 +106,8 @@ class BSInfo : public Module public: BSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , commandbsinfo(this, onbotinfo), onbotinfo(this, "OnServiceBot") + , commandbsinfo(this, onbotinfo) + , onbotinfo(this) { } diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index b29a5dc31..e7b4738cd 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -1279,8 +1279,8 @@ class BSKick : public Module public: BSKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ServiceBotEvent>("OnServiceBotEvent") - , EventHook<Event::Privmsg>("OnPrivmsg") + , EventHook<Event::ServiceBotEvent>() + , EventHook<Event::Privmsg>() , bandata(this, "bandata") , userdata(this, "userdata") @@ -1303,7 +1303,7 @@ class BSKick : public Module , purger(this) - , onbotban(this, "OnBotBan") + , onbotban(this) { me = this; } diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index 8a95edcaf..58015ba01 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -194,7 +194,7 @@ class BSSet : public Module public: BSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::BotBan>("OnBotBan") + , EventHook<Event::BotBan>() , commandbsset(this) , commandbssetbanexpire(this) , commandbssetprivate(this) diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index e1431e977..7e9c47993 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -891,10 +891,10 @@ class CSAccess : public Module public: CSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::GroupCheckPriv>("OnGroupCheckPriv") + , EventHook<Event::GroupCheckPriv>() , commandcsaccess(this) , commandcslevels(this, onlevelchange) - , onlevelchange(this, "OnLevelChange") + , onlevelchange(this) , accesschanaccesstype(this) { this->SetPermanent(true); diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 4174c9b20..f88904a46 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -668,9 +668,9 @@ class CSAKick : public Module public: CSAKick(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::CheckKick>("OnCheckKick") + , EventHook<Event::CheckKick>() , commandcsakick(this, akickevents) - , akickevents(this, "Akick") + , akickevents(this) , akick_type(this) { } diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 6ac3df61c..a1020bcab 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -92,7 +92,7 @@ class CSDrop : public Module public: CSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandcsdrop(this, onchandrop) - , onchandrop(this, "OnChanDrop") + , onchandrop(this) { } diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 6695a7cec..51654ea84 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -254,7 +254,7 @@ class CSEntryMessage : public Module public: CSEntryMessage(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::JoinChannel>("OnJoinChannel") + , EventHook<Event::JoinChannel>() , commandentrymsg(this) , entrymsg_type(this) { diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 7f08e7e91..43405a18d 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -88,7 +88,7 @@ class CSInfo : public Module public: CSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandcsinfo(this, eventonchaninfo) - , eventonchaninfo(this, "OnChanInfo") + , eventonchaninfo(this) { } diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index 9e7e6a31b..44c96d0ce 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -244,7 +244,7 @@ class CSList : public Module public: CSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::ChanInfo>() , commandcslist(this) , commandcssetprivate(this) , priv(this, "CS_PRIVATE") diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 695493b78..6c7ca03d1 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -345,8 +345,8 @@ class CSLog : public Module public: CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChanRegistered>("OnChanRegistered") - , EventHook<Event::Log>("OnLog") + , EventHook<Event::ChanRegistered>() + , EventHook<Event::Log>() , commandcslog(this) , logtype(this) { diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index f66c5ce87..d26e113d6 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -861,14 +861,14 @@ class CSMode : public Module public: CSMode(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::CheckModes>("OnCheckModes") - , EventHook<Event::ChanRegistered>("OnChanRegistered") - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::CheckModes>() + , EventHook<Event::ChanRegistered>() + , EventHook<Event::ChanInfo>() , commandcsmode(this) , commandcsmodes(this) , modelock(this) , modelock_type(this) - , modelockevents(this, "MLock") + , modelockevents(this) { events = &modelockevents; } diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index c730609be..0474b8e26 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -378,13 +378,13 @@ class CSSeen : public Module public: CSSeen(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ExpireTick>("OnExpireTick") - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::UserQuit>("OnUserQuit") - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::PartChannel>("OnPartChannel") - , EventHook<Event::PreUserKicked>("OnPreUserKicked") + , EventHook<Event::ExpireTick>() + , EventHook<Event::UserConnect>() + , EventHook<Event::UserNickChange>() + , EventHook<Event::UserQuit>() + , EventHook<Event::JoinChannel>() + , EventHook<Event::PartChannel>() + , EventHook<Event::PreUserKicked>() // , seeninfo_type("SeenInfo", SeenInfo::Unserialize) , commandseen(this) , commandosseen(this) diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 2a811b5b2..9cf58c029 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1101,18 +1101,18 @@ class CSSet : public Module public: CSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::CreateChan>("OnCreateChan") - , EventHook<Event::ChannelCreate>("OnChannelCreate") - , EventHook<Event::ChannelSync>("OnChannelSync") - , EventHook<Event::CheckKick>("OnCheckKick") - , EventHook<Event::DelChan>("OnDelChan") - , EventHook<Event::ChannelModeSet>("OnChannelModeSet") - , EventHook<Event::ChannelModeUnset>("OnChannelModeUnset") - , EventHook<Event::CheckDelete>("OnCheckDelete") - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::SetCorrectModes>("OnSetCorrectModes") - , EventHook<ChanServ::Event::PreChanExpire>("OnPreChanExpire") - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::CreateChan>() + , EventHook<Event::ChannelCreate>() + , EventHook<Event::ChannelSync>() + , EventHook<Event::CheckKick>() + , EventHook<Event::DelChan>() + , EventHook<Event::ChannelModeSet>() + , EventHook<Event::ChannelModeUnset>() + , EventHook<Event::CheckDelete>() + , EventHook<Event::JoinChannel>() + , EventHook<Event::SetCorrectModes>() + , EventHook<ChanServ::Event::PreChanExpire>() + , EventHook<Event::ChanInfo>() , noautoop(this, ChanServ::channel, "NOAUTOOP") , peace(this, ChanServ::channel, "PEACE") diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp index 35b943f6c..48716b194 100644 --- a/modules/commands/cs_set_misc.cpp +++ b/modules/commands/cs_set_misc.cpp @@ -175,7 +175,7 @@ class CSSetMisc : public Module public: CSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::ChanInfo>() , commandcssetmisc(this) , type(this) { diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index dadb7c15d..6fd234014 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -268,14 +268,14 @@ class CSSuspend : public Module public: CSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChanInfo>("OnChanInfo") - , EventHook<ChanServ::Event::PreChanExpire>("OnPreChanExpire") - , EventHook<Event::CheckKick>("OnCheckKick") - , EventHook<Event::ChanDrop>("OnChanDrop") + , EventHook<Event::ChanInfo>() + , EventHook<ChanServ::Event::PreChanExpire>() + , EventHook<Event::CheckKick>() + , EventHook<Event::ChanDrop>() , commandcssuspend(this, onchansuspend) , commandcsunsuspend(this, onchanunsuspend) - , onchansuspend(this, "OnChanSuspend") - , onchanunsuspend(this, "OnChanUnsuspend") + , onchansuspend(this) + , onchanunsuspend(this) , cst(this) { } diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index 213876749..5fd40bdf0 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -211,9 +211,9 @@ class CSTopic : public Module public: CSTopic(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChannelSync>("OnChannelSync") - , EventHook<Event::TopicUpdated>("OnTopicUpdated") - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::ChannelSync>() + , EventHook<Event::TopicUpdated>() + , EventHook<Event::ChanInfo>() , commandcstopic(this) , commandcssetkeeptopic(this) , topiclock(this, "TOPICLOCK") diff --git a/modules/commands/greet.cpp b/modules/commands/greet.cpp index a66b28e11..9134876cc 100644 --- a/modules/commands/greet.cpp +++ b/modules/commands/greet.cpp @@ -170,9 +170,9 @@ class Greet : public Module public: Greet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::NickInfo>("OnNickInfo") - , EventHook<Event::ServiceBotEvent>("OnServiceBotEvent") + , EventHook<Event::JoinChannel>() + , EventHook<Event::NickInfo>() + , EventHook<Event::ServiceBotEvent>() , bs_greet(this, ChanServ::channel, "BS_GREET") , ns_greet(this, NickServ::account, "greet") , commandbssetgreet(this) diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index 419474574..debb25837 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -188,7 +188,7 @@ class Help : public Module public: Help(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandhelp(this, onhelp) - , onhelp(this, "Help") + , onhelp(this) { } diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp index 8c9c20c1c..4d7e7aac9 100644 --- a/modules/commands/hs_del.cpp +++ b/modules/commands/hs_del.cpp @@ -99,7 +99,7 @@ class HSDel : public Module HSDel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandhsdel(this, ondeletevhost) , commandhsdelall(this, ondeletevhost) - , ondeletevhost(this, "OnDeleteVhost") + , ondeletevhost(this) { } diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index dc66d4477..5635b8ce6 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -84,8 +84,8 @@ class HSGroup : public Module public: HSGroup(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::SetVhost>("OnSetVhost") - , EventHook<Event::NickGroup>("OnNickGroup") + , EventHook<Event::SetVhost>() + , EventHook<Event::NickGroup>() , commandhsgroup(this) { } diff --git a/modules/commands/ns_access.cpp b/modules/commands/ns_access.cpp index d944c8736..7b727452a 100644 --- a/modules/commands/ns_access.cpp +++ b/modules/commands/ns_access.cpp @@ -236,7 +236,7 @@ class NSAccess : public Module public: NSAccess(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<NickServ::Event::NickRegister>("OnNickRegister") + , EventHook<NickServ::Event::NickRegister>() , commandnsaccess(this) , nick_type(this) { diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index 93fb136b9..7aca41b3e 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -282,7 +282,7 @@ class NSAJoin : public Module public: NSAJoin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserLogin>("OnUserLogin") + , EventHook<Event::UserLogin>() , commandnsajoin(this) , ajtype(this) { diff --git a/modules/commands/ns_cert.cpp b/modules/commands/ns_cert.cpp index c743c619a..a241f9c97 100644 --- a/modules/commands/ns_cert.cpp +++ b/modules/commands/ns_cert.cpp @@ -313,11 +313,11 @@ class NSCert : public Module public: NSCert(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::Fingerprint>("OnFingerprint") - , EventHook<NickServ::Event::NickValidate>("OnNickValidate") + , EventHook<Event::Fingerprint>() + , EventHook<NickServ::Event::NickValidate>() , commandnscert(this) , cs(this) - , onnickservevents(this, "OnNickCert") + , onnickservevents(this) { if (!IRCD || !IRCD->CanCertFP) throw ModuleException("Your IRCd does not support ssl client certificates"); diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp index f778cac00..62ee41970 100644 --- a/modules/commands/ns_drop.cpp +++ b/modules/commands/ns_drop.cpp @@ -82,7 +82,7 @@ class NSDrop : public Module public: NSDrop(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandnsdrop(this, onnickdrop) - , onnickdrop(this, "OnNickDrop") + , onnickdrop(this) { } diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index 0af17d29a..e3acf74f9 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -375,7 +375,7 @@ class NSGroup : public Module , commandnsgroup(this, onnickgroup) , commandnsungroup(this) , commandnsglist(this) - , onnickgroup(this, "OnNickGroup") + , onnickgroup(this) { if (Config->GetModule("nickserv")->Get<bool>("nonicknameownership")) throw ModuleException(modname + " can not be used with options:nonicknameownership enabled"); diff --git a/modules/commands/ns_info.cpp b/modules/commands/ns_info.cpp index 63adea013..7091e53fd 100644 --- a/modules/commands/ns_info.cpp +++ b/modules/commands/ns_info.cpp @@ -268,7 +268,7 @@ class NSInfo : public Module , commandnsinfo(this, onnickinfo) , commandnssethide(this) , commandnssasethide(this) - , onnickinfo(this, "OnNickInfo") + , onnickinfo(this) , hide_email(this, NickServ::account, "HIDE_EMAIL") , hide_usermask(this, NickServ::account, "HIDE_MASK") , hide_status(this, NickServ::account, "HIDE_STATUS") diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp index b382625d8..e5dd56562 100644 --- a/modules/commands/ns_list.cpp +++ b/modules/commands/ns_list.cpp @@ -270,7 +270,7 @@ class NSList : public Module public: NSList(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::NickInfo>("OnNickInfo") + , EventHook<Event::NickInfo>() , commandnslist(this) , commandnssetprivate(this) , commandnssasetprivate(this) diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index f3caf416b..21d11124f 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -202,8 +202,8 @@ class NSRecover : public Module public: NSRecover(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::JoinChannel>("OnJoinChannel") + , EventHook<Event::UserNickChange>() + , EventHook<Event::JoinChannel>() , commandnsrecover(this) , recover(this, "recover") { diff --git a/modules/commands/ns_register.cpp b/modules/commands/ns_register.cpp index 4e7890d79..1c601e2a2 100644 --- a/modules/commands/ns_register.cpp +++ b/modules/commands/ns_register.cpp @@ -350,8 +350,8 @@ class NSRegister : public Module public: NSRegister(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::NickIdentify>("OnNickIdentify") - , EventHook<NickServ::Event::PreNickExpire>("OnPreNickExpire") + , EventHook<Event::NickIdentify>() + , EventHook<NickServ::Event::PreNickExpire>() , commandnsregister(this) , commandnsconfirm(this) , commandnsrsend(this) diff --git a/modules/commands/ns_resetpass.cpp b/modules/commands/ns_resetpass.cpp index a1c32976c..2ee7f7a01 100644 --- a/modules/commands/ns_resetpass.cpp +++ b/modules/commands/ns_resetpass.cpp @@ -67,7 +67,7 @@ class NSResetPass : public Module public: NSResetPass(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::PreCommand>("OnPreCommand") + , EventHook<Event::PreCommand>() , commandnsresetpass(this), reset(this, "reset") { if (!Config->GetBlock("mail")->Get<bool>("usemail")) diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index d78edb150..f60c23053 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -1107,13 +1107,13 @@ class NSSet : public Module public: NSSet(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::PreCommand>("OnPreCommand") - , EventHook<Event::SetCorrectModes>("OnSetCorrectModes") - , EventHook<NickServ::Event::PreNickExpire>("OnPreNickExpire") - , EventHook<Event::NickInfo>("OnNickInfo") - , EventHook<Event::UserModeSet>("OnUserModeSet") - , EventHook<Event::UserModeUnset>("OnUserModeUnset") - , EventHook<Event::UserLogin>("OnUserLogin") + , EventHook<Event::PreCommand>() + , EventHook<Event::SetCorrectModes>() + , EventHook<NickServ::Event::PreNickExpire>() + , EventHook<Event::NickInfo>() + , EventHook<Event::UserModeSet>() + , EventHook<Event::UserModeUnset>() + , EventHook<Event::UserLogin>() , commandnsset(this) , commandnssaset(this) , commandnssetautoop(this) @@ -1147,7 +1147,7 @@ class NSSet : public Module , ns_set_email(this, "ns_set_email") - , onsetnickoption(this, "OnSetNickOption") + , onsetnickoption(this) { } diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index 8a84a459c..a062f0511 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -186,7 +186,7 @@ class NSSetMisc : public Module public: NSSetMisc(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::NickInfo>("OnNickInfo") + , EventHook<Event::NickInfo>() , commandnssetmisc(this) , commandnssasetmisc(this) , type(this) diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp index 15219dad7..9019b5f7d 100644 --- a/modules/commands/ns_suspend.cpp +++ b/modules/commands/ns_suspend.cpp @@ -199,10 +199,10 @@ class CommandNSSuspend : public Command class CommandNSUnSuspend : public Command { - EventHandlers<Event::NickUnsuspended> &onnickunsuspend; + EventHandlers<Event::NickUnsuspend> &onnickunsuspend; public: - CommandNSUnSuspend(Module *creator, EventHandlers<Event::NickUnsuspended> &event) : Command(creator, "nickserv/unsuspend", 1, 1), onnickunsuspend(event) + CommandNSUnSuspend(Module *creator, EventHandlers<Event::NickUnsuspend> &event) : Command(creator, "nickserv/unsuspend", 1, 1), onnickunsuspend(event) { this->SetDesc(_("Unsuspend a given nick")); this->SetSyntax(_("\037account\037")); @@ -235,7 +235,7 @@ class CommandNSUnSuspend : public Command source.Reply(_("\002{0}\002 is now released."), na->GetNick()); - this->onnickunsuspend(&Event::NickUnsuspended::OnNickUnsuspended, na); + this->onnickunsuspend(&Event::NickUnsuspend::OnNickUnsuspend, na); } bool OnHelp(CommandSource &source, const Anope::string &subcommand) override @@ -253,7 +253,7 @@ class NSSuspend : public Module CommandNSSuspend commandnssuspend; CommandNSUnSuspend commandnsunsuspend; EventHandlers<Event::NickSuspend> onnicksuspend; - EventHandlers<Event::NickUnsuspended> onnickunsuspend; + EventHandlers<Event::NickUnsuspend> onnickunsuspend; std::vector<Anope::string> show; NSSuspendType nst; @@ -272,13 +272,13 @@ class NSSuspend : public Module public: NSSuspend(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::NickInfo>("OnNickInfo") - , EventHook<NickServ::Event::PreNickExpire>("OnPreNickExpire") - , EventHook<NickServ::Event::NickValidate>("OnNickValidate") + , EventHook<Event::NickInfo>() + , EventHook<NickServ::Event::PreNickExpire>() + , EventHook<NickServ::Event::NickValidate>() , commandnssuspend(this, onnicksuspend) , commandnsunsuspend(this, onnickunsuspend) - , onnicksuspend(this, "OnNickSuspend") - , onnickunsuspend(this, "OnNickUnsuspended") + , onnicksuspend(this) + , onnickunsuspend(this) , nst(this) { } diff --git a/modules/commands/ns_update.cpp b/modules/commands/ns_update.cpp index 9f16f59c2..0022f389d 100644 --- a/modules/commands/ns_update.cpp +++ b/modules/commands/ns_update.cpp @@ -58,7 +58,7 @@ class NSUpdate : public Module public: NSUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) , commandnsupdate(this, onnickupdate) - , onnickupdate(this, "OnNickUpdate") + , onnickupdate(this) { } diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index c97c33bb4..9e38d0779 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -337,16 +337,16 @@ class OSDefcon : public Module public: OSDefcon(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChannelModeSet>("OnChannelModeSet") - , EventHook<Event::ChannelModeUnset>("OnChannelModeUnset") - , EventHook<Event::PreCommand>("OnPreCommand") - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::ChannelModeAdd>("OnChannelModeAdd") - , EventHook<Event::ChannelSync>("OnChannelSync") + , EventHook<Event::ChannelModeSet>() + , EventHook<Event::ChannelModeUnset>() + , EventHook<Event::PreCommand>() + , EventHook<Event::UserConnect>() + , EventHook<Event::ChannelModeAdd>() + , EventHook<Event::ChannelSync>() , session_service("SessionService", "session") , akills("XLineManager", "xlinemanager/sgline") , commandosdefcon(this, ondefconlevel) - , ondefconlevel(this, "OnDefconLevel") + , ondefconlevel(this) { } diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index fe61a9b63..2d68583e2 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -802,11 +802,11 @@ class ModuleDNS : public Module public: ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::NewServer>("OnNewServer") - , EventHook<Event::ServerQuit>("OnServerQuit") - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::PreUserLogoff>("OnPreUserLogoff") - , EventHook<Event::DnsRequest>("OnDnsRequest") + , EventHook<Event::NewServer>() + , EventHook<Event::ServerQuit>() + , EventHook<Event::UserConnect>() + , EventHook<Event::PreUserLogoff>() + , EventHook<Event::DnsRequest>() , zonetype(this) , servertype(this) , zonemembtype(this) diff --git a/modules/commands/os_forbid.cpp b/modules/commands/os_forbid.cpp index f8afcc6ee..95ad737b3 100644 --- a/modules/commands/os_forbid.cpp +++ b/modules/commands/os_forbid.cpp @@ -460,10 +460,10 @@ class OSForbid : public Module public: OSForbid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::CheckKick>("OnCheckKick") - , EventHook<Event::PreCommand>("OnPreCommand") + , EventHook<Event::UserConnect>() + , EventHook<Event::UserNickChange>() + , EventHook<Event::CheckKick>() + , EventHook<Event::PreCommand>() , forbid_service(this) , type(this) , commandosforbid(this) diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp index 8210700a0..e260ed7d0 100644 --- a/modules/commands/os_ignore.cpp +++ b/modules/commands/os_ignore.cpp @@ -374,7 +374,7 @@ class OSIgnore : public Module public: OSIgnore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::BotPrivmsg>("OnBotPrivmsg") + , EventHook<Event::BotPrivmsg>() , ignoretype(this) , osignoreservice(this) , commandosignore(this) diff --git a/modules/commands/os_info.cpp b/modules/commands/os_info.cpp index 7c17cb2a0..4342791a7 100644 --- a/modules/commands/os_info.cpp +++ b/modules/commands/os_info.cpp @@ -241,8 +241,8 @@ class OSInfo : public Module public: OSInfo(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::NickInfo>("OnNickInfo") - , EventHook<Event::ChanInfo>("OnChanInfo") + , EventHook<Event::NickInfo>() + , EventHook<Event::ChanInfo>() , commandosinfo(this) , oinfotype(this) { diff --git a/modules/commands/os_login.cpp b/modules/commands/os_login.cpp index 8aae3c302..f09d794b2 100644 --- a/modules/commands/os_login.cpp +++ b/modules/commands/os_login.cpp @@ -125,7 +125,7 @@ class OSLogin : public Module public: OSLogin(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::IsServicesOperEvent>("OnIsServicesOperEvent") + , EventHook<Event::IsServicesOperEvent>() , commandoslogin(this) , commandoslogout(this) , os_login(this, "os_login") diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index a552f22d2..547952ea6 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -426,8 +426,8 @@ class OSNews : public Module public: OSNews(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserModeSet>("OnUserModeSet") - , EventHook<Event::UserConnect>("OnUserConnect") + , EventHook<Event::UserModeSet>() + , EventHook<Event::UserConnect>() , newsitemtype(this) , commandoslogonnews(this) , commandosopernews(this) diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp index 31709c078..14cf8b8c4 100644 --- a/modules/commands/os_noop.cpp +++ b/modules/commands/os_noop.cpp @@ -77,7 +77,7 @@ class OSNOOP : public Module public: OSNOOP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserModeSet>("OnUserModeSet") + , EventHook<Event::UserModeSet>() , commandosnoop(this) , noop(this, "noop") { diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 4580e4a8d..e33b89756 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -671,14 +671,14 @@ class OSSession : public Module public: OSSession(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::UserConnect>("OnUserConnect", EventHook<Event::UserConnect>::Priority::FIRST) - , EventHook<Event::UserQuit>("OnUserQuit", EventHook<Event::UserQuit>::Priority::FIRST) - , EventHook<Event::ExpireTick>("OnExpireTick", EventHook<Event::ExpireTick>::Priority::FIRST) + , EventHook<Event::UserConnect>(EventHook<Event::UserConnect>::Priority::FIRST) + , EventHook<Event::UserQuit>(EventHook<Event::UserQuit>::Priority::FIRST) + , EventHook<Event::ExpireTick>(EventHook<Event::ExpireTick>::Priority::FIRST) , ss(this) , commandossession(this) , commandosexception(this) , akills("XLineManager", "xlinemanager/sgline") - , exceptionevents(this, "Exception") + , exceptionevents(this) , etype(this) { this->SetPermanent(true); diff --git a/modules/cs_statusupdate.cpp b/modules/cs_statusupdate.cpp index 9874c90d6..312aaac71 100644 --- a/modules/cs_statusupdate.cpp +++ b/modules/cs_statusupdate.cpp @@ -13,8 +13,8 @@ class StatusUpdate : public Module { public: StatusUpdate(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::AccessAdd>("OnAccessAdd") - , EventHook<Event::AccessDel>("OnAccessDel") + , EventHook<Event::AccessAdd>() + , EventHook<Event::AccessDel>() { } diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 91e43e14e..61c6645cb 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -80,8 +80,8 @@ class DBFlatFile : public Module public: DBFlatFile(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) - , EventHook<Event::LoadDatabase>("OnLoadDatabase") - , EventHook<Event::SaveDatabase>("OnSaveDatabase") + , EventHook<Event::LoadDatabase>() + , EventHook<Event::SaveDatabase>() , last_day(0) , loaded(false) { diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index fe7a47dc7..7058bcd2b 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -1367,8 +1367,8 @@ class DBOld : public Module public: DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) - , EventHook<Event::LoadDatabase>("OnLoadDatabase") - , EventHook<Event::UplinkSync>("OnUplinkSync") + , EventHook<Event::LoadDatabase>() + , EventHook<Event::UplinkSync>() , mlock_on(this, "mlock_on") , mlock_off(this, "mlock_off") , mlock_limit(this, "mlock_limit") diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp index 6105bfa65..33027d398 100644 --- a/modules/database/db_redis.cpp +++ b/modules/database/db_redis.cpp @@ -65,8 +65,8 @@ class DatabaseRedis : public Module ServiceReference<Provider> redis; DatabaseRedis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) - , EventHook<Event::LoadDatabase>("OnLoadDatabase") - , EventHook<Event::SerializeEvents>("OnSerialize") + , EventHook<Event::LoadDatabase>() + , EventHook<Event::SerializeEvents>() , sl(this) { me = this; diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 3481d3a89..fe22f6394 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -50,7 +50,7 @@ class DBMySQL : public Module, public Pipe public: DBMySQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR) - , EventHook<Event::SerializeEvents>("OnSerialize") + , EventHook<Event::SerializeEvents>() { } diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/enc_bcrypt.cpp index 1a4e00e20..98dd30664 100644 --- a/modules/encryption/enc_bcrypt.cpp +++ b/modules/encryption/enc_bcrypt.cpp @@ -877,8 +877,8 @@ class EBCRYPT : public Module public: EBCRYPT(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR | EXTRA) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::CheckAuthentication>() , rounds(10) { // Test a pre-calculated hash diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp index 3de183adb..79ab3dcd4 100644 --- a/modules/encryption/enc_md5.cpp +++ b/modules/encryption/enc_md5.cpp @@ -345,8 +345,8 @@ class EMD5 : public Module public: EMD5(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::CheckAuthentication>() , md5provider(this) { if (ModuleManager::FindFirstOf(ENCRYPTION) == this) diff --git a/modules/encryption/enc_none.cpp b/modules/encryption/enc_none.cpp index 86f01ae38..f9b1d1f96 100644 --- a/modules/encryption/enc_none.cpp +++ b/modules/encryption/enc_none.cpp @@ -16,9 +16,9 @@ class ENone : public Module { public: ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::Decrypt>("OnDecrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::Decrypt>() + , EventHook<Event::CheckAuthentication>() { } diff --git a/modules/encryption/enc_old.cpp b/modules/encryption/enc_old.cpp index ec2c076cf..58be6f0da 100644 --- a/modules/encryption/enc_old.cpp +++ b/modules/encryption/enc_old.cpp @@ -44,8 +44,8 @@ class EOld : public Module public: EOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::CheckAuthentication>() , oldmd5provider(this) { if (ModuleManager::FindFirstOf(ENCRYPTION) == this) diff --git a/modules/encryption/enc_sha1.cpp b/modules/encryption/enc_sha1.cpp index 010add276..6fae784f2 100644 --- a/modules/encryption/enc_sha1.cpp +++ b/modules/encryption/enc_sha1.cpp @@ -200,8 +200,8 @@ class ESHA1 : public Module public: ESHA1(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::CheckAuthentication>() , sha1provider(this) { if (ModuleManager::FindFirstOf(ENCRYPTION) == this) diff --git a/modules/encryption/enc_sha256.cpp b/modules/encryption/enc_sha256.cpp index e7989c24d..1f518cae2 100644 --- a/modules/encryption/enc_sha256.cpp +++ b/modules/encryption/enc_sha256.cpp @@ -275,8 +275,8 @@ class ESHA256 : public Module public: ESHA256(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR) - , EventHook<Event::Encrypt>("OnEncrypt") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::Encrypt>() + , EventHook<Event::CheckAuthentication>() , sha256provider(this) { diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 6c8da7688..a5a6b0e3f 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -451,7 +451,7 @@ class ModuleLDAP : public Module, public Pipe public: ModuleLDAP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::ModuleUnload>("OnModuleUnload") + , EventHook<Event::ModuleUnload>() { me = this; diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index 0445149c1..d999d90b6 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -88,8 +88,8 @@ class LDAPOper : public Module Anope::string filter; public: LDAPOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::NickIdentify>("OnNickIdentify") - , EventHook<Event::DelCore>("OnDelCore") + , EventHook<Event::NickIdentify>() + , EventHook<Event::DelCore>() , ldap("LDAPProvider", "ldap/main") , iinterface(this) { diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 2a6e5f8d8..e19813354 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -182,7 +182,7 @@ class ModuleSQL : public Module DispatcherThread *DThread; ModuleSQL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::ModuleUnload>("OnModuleUnload") + , EventHook<Event::ModuleUnload>() { me = this; diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index d0210ec54..8b673d6cf 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -78,8 +78,8 @@ class ModuleSQLAuthentication : public Module public: ModuleSQLAuthentication(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::PreCommand>("OnPreCommand") - , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , EventHook<Event::PreCommand>() + , EventHook<Event::CheckAuthentication>() { me = this; diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/m_sql_log.cpp index 2be893cba..d7cee3913 100644 --- a/modules/extra/m_sql_log.cpp +++ b/modules/extra/m_sql_log.cpp @@ -18,7 +18,7 @@ class SQLLog : public Module public: SQLLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR | EXTRA) - , EventHook<Event::LogMessage>("OnLogMessage") + , EventHook<Event::LogMessage>() { } diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index fe62111ec..b182370c9 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -99,7 +99,7 @@ class ModuleSQLOper : public Module public: ModuleSQLOper(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), - EventHook<Event::NickIdentify>("OnNickIdentify") + EventHook<Event::NickIdentify>() { } diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index 9be87d95c..23e8211dd 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -303,7 +303,7 @@ class GnuTLSModule : public Module MySSLService service; GnuTLSModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::PreServerConnect>("OnPreServerConnect") + , EventHook<Event::PreServerConnect>() , cred(NULL) , service(this, "ssl") { diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 23e2596ce..4462f84c5 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -90,7 +90,7 @@ class SSLModule : public Module MySSLService service; SSLModule(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::PreServerConnect>("OnPreServerConnect") + , EventHook<Event::PreServerConnect>() , service(this, "ssl") { me = this; diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 3b0e2c912..4122987d2 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -95,12 +95,12 @@ class Fantasy : public Module public: Fantasy(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::Privmsg>("OnPrivmsg") - , EventHook<Event::ServiceBotEvent>("OnServiceBotEvent") + , EventHook<Event::Privmsg>() + , EventHook<Event::ServiceBotEvent>() , fantasy(this, ChanServ::channel, "BS_FANTASY") , commandbssetfantasy(this) - , OnBotFantasy(this, "OnBotFantasy") - , OnBotNoFantasyAccess(this, "OnBotNoFantasyAccess") + , OnBotFantasy(this) + , OnBotNoFantasyAccess(this) { } diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index a4c2f21ac..0fa753dcf 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -1016,7 +1016,7 @@ class ModuleDNS : public Module public: ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::ModuleUnload>("OnModuleUnload") + , EventHook<Event::ModuleUnload>() , manager(this) { diff --git a/modules/m_dnsbl.cpp b/modules/m_dnsbl.cpp index 6f0938802..5ec4239e0 100644 --- a/modules/m_dnsbl.cpp +++ b/modules/m_dnsbl.cpp @@ -96,7 +96,7 @@ class ModuleDNSBL : public Module public: ModuleDNSBL(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR | EXTRA) - , EventHook<Event::UserConnect>("OnUserConnect") + , EventHook<Event::UserConnect>() { } diff --git a/modules/m_helpchan.cpp b/modules/m_helpchan.cpp index 31009091d..1dec096e2 100644 --- a/modules/m_helpchan.cpp +++ b/modules/m_helpchan.cpp @@ -12,7 +12,7 @@ class HelpChannel : public Module { public: HelpChannel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::ChannelModeSet>("OnChannelModeSet") + , EventHook<Event::ChannelModeSet>() { } diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp index 2d959ef14..8498ba2a2 100644 --- a/modules/m_httpd.cpp +++ b/modules/m_httpd.cpp @@ -340,7 +340,7 @@ class HTTPD : public Module std::map<Anope::string, MyHTTPProvider *> providers; public: HTTPD(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::ModuleLoad>("OnModuleLoad") + , EventHook<Event::ModuleLoad>() , sslref("SSLService", "ssl") { diff --git a/modules/m_proxyscan.cpp b/modules/m_proxyscan.cpp index c86624d96..782ae0d08 100644 --- a/modules/m_proxyscan.cpp +++ b/modules/m_proxyscan.cpp @@ -221,7 +221,7 @@ class ModuleProxyScan : public Module public: ModuleProxyScan(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::UserConnect>("OnUserConnect") + , EventHook<Event::UserConnect>() , connectionTimeout(this, 5) { diff --git a/modules/m_redis.cpp b/modules/m_redis.cpp index 195873952..a98b94476 100644 --- a/modules/m_redis.cpp +++ b/modules/m_redis.cpp @@ -504,7 +504,7 @@ class ModuleRedis : public Module public: ModuleRedis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) - , EventHook<Event::ModuleUnload>("OnModuleUnload") + , EventHook<Event::ModuleUnload>() { } diff --git a/modules/ns_maxemail.cpp b/modules/ns_maxemail.cpp index 5673abba5..4600f9400 100644 --- a/modules/ns_maxemail.cpp +++ b/modules/ns_maxemail.cpp @@ -49,7 +49,7 @@ class NSMaxEmail : public Module public: NSMaxEmail(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR) - , EventHook<Event::PreCommand>("OnPreCommand") + , EventHook<Event::PreCommand>() { } diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 6839b91e1..8f7d26351 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -542,7 +542,7 @@ class ProtoBahamut : public Module public: ProtoBahamut(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange") + , EventHook<Event::UserNickChange>() , ircd_proto(this) , message_away(this) , message_capab(this) diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 5f24df8e6..3c9061511 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -324,8 +324,8 @@ class ProtoCharybdis : public Module public: ProtoCharybdis(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::ChannelSync>("OnChannelSync") - , EventHook<Event::MLockEvents>("MLock") + , EventHook<Event::ChannelSync>() + , EventHook<Event::MLockEvents>() , ircd_proto(this) , message_away(this) , message_capab(this) diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index cabf1b751..7f008fcb6 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -667,7 +667,7 @@ class ProtoHybrid : public Module public: ProtoHybrid(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange") + , EventHook<Event::UserNickChange>() , ircd_proto(this) , message_away(this) , message_capab(this) diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index eab1f75a7..8d07fe108 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -1609,13 +1609,13 @@ class ProtoInspIRCd20 : public Module public: ProtoInspIRCd20(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::ChannelSync>("OnChannelSync") - , EventHook<Event::ChanRegistered>("OnChanRegistered") - , EventHook<Event::DelChan>("OnDelChan") - , EventHook<Event::MLockEvents>("MLock") - , EventHook<Event::SetChannelOption>("OnSetChannelOption") - , EventHook<Event::ChannelModeUnset>("OnChannelModeUnset") + , EventHook<Event::UserNickChange>() + , EventHook<Event::ChannelSync>() + , EventHook<Event::ChanRegistered>() + , EventHook<Event::DelChan>() + , EventHook<Event::MLockEvents>() + , EventHook<Event::SetChannelOption>() + , EventHook<Event::ChannelModeUnset>() , ircd_proto(this) , ssl(this, "ssl") , message_away(this) diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index bd027731b..9b78579c2 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -668,7 +668,7 @@ class ProtongIRCd : public Module public: ProtongIRCd(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange") + , EventHook<Event::UserNickChange>() , ircd_proto(this) , message_capab(this) , message_error(this) diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index 918bf09f6..dc85c6f89 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -1249,11 +1249,11 @@ class ProtoUnreal : public Module public: ProtoUnreal(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PROTOCOL | VENDOR) - , EventHook<Event::UserNickChange>("OnUserNickChange", EventHook<Event::UserNickChange>::Priority::FIRST) - , EventHook<Event::ChannelSync>("OnChannelSync", EventHook<Event::ChannelSync>::Priority::FIRST) - , EventHook<Event::ChanRegistered>("OnChanRegistered", EventHook<Event::ChanRegistered>::Priority::FIRST) - , EventHook<Event::DelChan>("OnDelChan", EventHook<Event::DelChan>::Priority::FIRST) - , EventHook<Event::MLockEvents>("MLock", EventHook<Event::MLockEvents>::Priority::FIRST) + , EventHook<Event::UserNickChange>(EventHook<Event::UserNickChange>::Priority::FIRST) + , EventHook<Event::ChannelSync>(EventHook<Event::ChannelSync>::Priority::FIRST) + , EventHook<Event::ChanRegistered>(EventHook<Event::ChanRegistered>::Priority::FIRST) + , EventHook<Event::DelChan>(EventHook<Event::DelChan>::Priority::FIRST) + , EventHook<Event::MLockEvents>(EventHook<Event::MLockEvents>::Priority::FIRST) , ircd_proto(this) , message_away(this) , message_error(this) diff --git a/modules/pseudoclients/botserv/botserv.cpp b/modules/pseudoclients/botserv/botserv.cpp index a2cfe7335..312b2a9d5 100644 --- a/modules/pseudoclients/botserv/botserv.cpp +++ b/modules/pseudoclients/botserv/botserv.cpp @@ -30,15 +30,15 @@ class BotServCore : public Module, public BotServ::BotServService public: BotServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , BotServ::BotServService(this) - , EventHook<Event::SetCorrectModes>("OnSetCorrectModes") - , EventHook<Event::BotAssign>("OnBotAssign") - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::LeaveChannel>("OnLeaveChannel") - , EventHook<Event::Help>("Help") - , EventHook<Event::ChannelModeSet>("OnChannelModeSet") - , EventHook<Event::CreateChan>("OnCreateChan") - , EventHook<Event::UserKicked>("OnUserKicked") - , EventHook<Event::CreateBot>("OnCreateBot") + , EventHook<Event::SetCorrectModes>() + , EventHook<Event::BotAssign>() + , EventHook<Event::JoinChannel>() + , EventHook<Event::LeaveChannel>() + , EventHook<Event::Help>() + , EventHook<Event::ChannelModeSet>() + , EventHook<Event::CreateChan>() + , EventHook<Event::UserKicked>() + , EventHook<Event::CreateBot>() , persist("PERSIST") , inhabit("inhabit") { diff --git a/modules/pseudoclients/chanserv/chanserv.cpp b/modules/pseudoclients/chanserv/chanserv.cpp index bfa7253f8..dbd7f14eb 100644 --- a/modules/pseudoclients/chanserv/chanserv.cpp +++ b/modules/pseudoclients/chanserv/chanserv.cpp @@ -59,30 +59,30 @@ class ChanServCore : public Module public: ChanServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , ChanServService(this) - , EventHook<Event::ChannelCreate>("OnChannelCreate") - , EventHook<Event::BotDelete>("OnBotDelete") - , EventHook<Event::BotPrivmsg>("OnBotPrivmsg") - , EventHook<Event::DelCore>("OnDelCore") - , EventHook<Event::DelChan>("OnDelChan") - , EventHook<Event::Help>("OnHelp") - , EventHook<Event::CheckModes>("OnCheckModes") - , EventHook<Event::CreateChan>("OnCreateChan") - , EventHook<Event::CanSet>("OnCanSet") - , EventHook<Event::ChannelSync>("OnChannelSync") - , EventHook<Event::Log>("OnLog") - , EventHook<Event::ExpireTick>("OnExpireTick") - , EventHook<Event::CheckDelete>("OnCheckDelete") - , EventHook<Event::PreUplinkSync>("OnPreUplinkSync") - , EventHook<Event::ChanRegistered>("OnChanRegistered") - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::ChannelModeSet>("OnChannelModeSet") - , EventHook<Event::ChanInfo>("OnChanInfo") - , EventHook<Event::SetCorrectModes>("OnSetCorrectModes") + , EventHook<Event::ChannelCreate>() + , EventHook<Event::BotDelete>() + , EventHook<Event::BotPrivmsg>() + , EventHook<Event::DelCore>() + , EventHook<Event::DelChan>() + , EventHook<Event::Help>() + , EventHook<Event::CheckModes>() + , EventHook<Event::CreateChan>() + , EventHook<Event::CanSet>() + , EventHook<Event::ChannelSync>() + , EventHook<Event::Log>() + , EventHook<Event::ExpireTick>() + , EventHook<Event::CheckDelete>() + , EventHook<Event::PreUplinkSync>() + , EventHook<Event::ChanRegistered>() + , EventHook<Event::JoinChannel>() + , EventHook<Event::ChannelModeSet>() + , EventHook<Event::ChanInfo>() + , EventHook<Event::SetCorrectModes>() , inhabit(this, "inhabit") , persist("PERSIST") , always_lower(false) - , OnPreChanExpire(this, "OnPreChanExpire") - , OnChanExpire(this, "OnChanExpire") + , OnPreChanExpire(this) + , OnChanExpire(this) , channel_type(this) , chanaccess_type(this, "ChanAccess") , level_type(this) diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index 11dc87146..108495c42 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -33,10 +33,10 @@ class GlobalCore : public Module public: GlobalCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , GlobalService(this) - , EventHook<Event::Restart>("OnRestart") - , EventHook<Event::Shutdown>("OnShutdown") - , EventHook<Event::NewServer>("OnNewServer") - , EventHook<Event::Help>("OnHelp") + , EventHook<Event::Restart>() + , EventHook<Event::Shutdown>() + , EventHook<Event::NewServer>() + , EventHook<Event::Help>() { } diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index bc9baee43..03fe451d4 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -25,11 +25,11 @@ class HostServCore : public Module public: HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) - , EventHook<Event::UserLogin>("OnUserLogin") - , EventHook<Event::NickUpdate>("OnNickUpdate") - , EventHook<Event::Help>("OnHelp") - , EventHook<Event::SetVhost>("OnSetVhost") - , EventHook<Event::DeleteVhost>("OnDeleteVhost") + , EventHook<Event::UserLogin>() + , EventHook<Event::NickUpdate>() + , EventHook<Event::Help>() + , EventHook<Event::SetVhost>() + , EventHook<Event::DeleteVhost>() { if (!IRCD || !IRCD->CanSetVHost) throw ModuleException("Your IRCd does not support vhosts"); diff --git a/modules/pseudoclients/memoserv/memoserv.cpp b/modules/pseudoclients/memoserv/memoserv.cpp index 9d695f553..7952ed637 100644 --- a/modules/pseudoclients/memoserv/memoserv.cpp +++ b/modules/pseudoclients/memoserv/memoserv.cpp @@ -62,16 +62,16 @@ class MemoServCore : public Module, public MemoServ::MemoServService public: MemoServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , MemoServ::MemoServService(this) - , EventHook<Event::NickCoreCreate>("OnNickCoreCreate") - , EventHook<Event::CreateChan>("OnCreateChan") - , EventHook<Event::BotDelete>("OnBotDelete") - , EventHook<Event::NickIdentify>("OnNickIdentify") - , EventHook<Event::JoinChannel>("OnJoinChannel") - , EventHook<Event::UserAway>("OnUserAway") - , EventHook<Event::NickUpdate>("OnNickUpdate") - , EventHook<Event::Help>("OnHelp") - , onmemosend(this, "OnMemoSend") - , onmemodel(this, "OnMemoDel") + , EventHook<Event::NickCoreCreate>() + , EventHook<Event::CreateChan>() + , EventHook<Event::BotDelete>() + , EventHook<Event::NickIdentify>() + , EventHook<Event::JoinChannel>() + , EventHook<Event::UserAway>() + , EventHook<Event::NickUpdate>() + , EventHook<Event::Help>() + , onmemosend(this) + , onmemodel(this) , memoinfo_type(this) , memo_type(this) , ignore_type(this) diff --git a/modules/pseudoclients/nickserv/nickserv.cpp b/modules/pseudoclients/nickserv/nickserv.cpp index 6f215cb86..23652c71d 100644 --- a/modules/pseudoclients/nickserv/nickserv.cpp +++ b/modules/pseudoclients/nickserv/nickserv.cpp @@ -154,32 +154,32 @@ class NickServCore : public Module, public NickServ::NickServService public: NickServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) , NickServ::NickServService(this) - , EventHook<Event::Shutdown>("OnShutdown") - , EventHook<Event::Restart>("OnRestart") - , EventHook<Event::UserLogin>("OnUserLogin") - , EventHook<Event::DelNick>("OnDelNick") - , EventHook<Event::DelCore>("OnDelCore") - , EventHook<Event::ChangeCoreDisplay>("OnChangeCoreDisplay") - , EventHook<Event::NickIdentify>("OnNickIdentify") - , EventHook<Event::NickGroup>("OnNickGroup") - , EventHook<Event::NickUpdate>("OnNickUpdate") - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::PostUserLogoff>("OnPostUserLogoff") - , EventHook<Event::ServerSync>("OnServerSync") - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::UserModeSet>("OnUserModeSet") - , EventHook<Event::Help>("OnHelp") - , EventHook<Event::ExpireTick>("OnExpireTick") - , EventHook<Event::NickInfo>("OnNickInfo") - , EventHook<Event::ModuleUnload>("OnModuleUnload") - , EventHook<Event::NickCoreCreate>("OnNickCoreCreate") - , EventHook<Event::UserQuit>("OnUserQuit") + , EventHook<Event::Shutdown>() + , EventHook<Event::Restart>() + , EventHook<Event::UserLogin>() + , EventHook<Event::DelNick>() + , EventHook<Event::DelCore>() + , EventHook<Event::ChangeCoreDisplay>() + , EventHook<Event::NickIdentify>() + , EventHook<Event::NickGroup>() + , EventHook<Event::NickUpdate>() + , EventHook<Event::UserConnect>() + , EventHook<Event::PostUserLogoff>() + , EventHook<Event::ServerSync>() + , EventHook<Event::UserNickChange>() + , EventHook<Event::UserModeSet>() + , EventHook<Event::Help>() + , EventHook<Event::ExpireTick>() + , EventHook<Event::NickInfo>() + , EventHook<Event::ModuleUnload>() + , EventHook<Event::NickCoreCreate>() + , EventHook<Event::UserQuit>() , held(this, "HELD") , collided(this, "COLLIDED") - , onprenickexpire(this, "OnPreNickExpire") - , onnickexpire(this, "OnNickExpire") - , onnickregister(this, "OnNickRegister") - , onnickvalidate(this, "OnNickValidate") + , onprenickexpire(this) + , onnickexpire(this) + , onnickregister(this) + , onnickvalidate(this) , nick_type(this) , account_type(this) , mode_type(this) diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index 5943450f6..4a81686e4 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -216,15 +216,15 @@ class OperServCore : public Module public: OperServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) - , EventHook<Event::BotPrivmsg>("OnBotPrivmsg") - , EventHook<Event::ServerQuit>("OnServerQuit") - , EventHook<Event::UserModeSet>("OnUserModeSet") - , EventHook<Event::UserModeUnset>("OnUserModeUnset") - , EventHook<Event::UserConnect>("OnUserConnect") - , EventHook<Event::UserNickChange>("OnUserNickChange") - , EventHook<Event::CheckKick>("OnCheckKick") - , EventHook<Event::Help>("OnHelp") - , EventHook<Event::Log>("OnLog") + , EventHook<Event::BotPrivmsg>() + , EventHook<Event::ServerQuit>() + , EventHook<Event::UserModeSet>() + , EventHook<Event::UserModeUnset>() + , EventHook<Event::UserConnect>() + , EventHook<Event::UserNickChange>() + , EventHook<Event::CheckKick>() + , EventHook<Event::Help>() + , EventHook<Event::Log>() , sgtype(this) , sglines(this) , sqtype(this) diff --git a/src/event.cpp b/src/event.cpp index 9a46b4ac2..3e313d5a0 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -12,87 +12,87 @@ using namespace Event; -EventHandlers<PreUserKicked> Event::OnPreUserKicked(nullptr, "OnPreUserKicked"); -EventHandlers<UserKicked> Event::OnUserKicked(nullptr, "OnUserKicked"); -EventHandlers<PreBotAssign> Event::OnPreBotAssign(nullptr, "OnPreBotAssign"); -EventHandlers<BotAssign> Event::OnBotAssign(nullptr, "OnBotAssign"); -EventHandlers<BotUnAssign> Event::OnBotUnAssign(nullptr, "OnBotUnAssign"); -EventHandlers<UserConnect> Event::OnUserConnect(nullptr, "OnUserConnect"); -EventHandlers<NewServer> Event::OnNewServer(nullptr, "OnNewServer"); -EventHandlers<UserNickChange> Event::OnUserNickChange(nullptr, "OnUserNickChange"); -EventHandlers<PreCommand> Event::OnPreCommand(nullptr, "OnPreCommand"); -EventHandlers<PostCommand> Event::OnPostCommand(nullptr, "OnPostCommand"); -EventHandlers<SaveDatabase> Event::OnSaveDatabase(nullptr, "OnSaveDatabase"); -EventHandlers<LoadDatabase> Event::OnLoadDatabase(nullptr, "OnLoadDatabase"); -EventHandlers<Encrypt> Event::OnEncrypt(nullptr, "OnEncrypt"); -EventHandlers<Decrypt> Event::OnDecrypt(nullptr, "OnDecrypt"); -EventHandlers<CreateBot> Event::OnCreateBot(nullptr, "OnCreateBot"); -EventHandlers<DelBot> Event::OnDelBot(nullptr, "OnDelBot"); -EventHandlers<PrePartChannel> Event::OnPrePartChannel(nullptr, "OnPrePartChannel"); -EventHandlers<PartChannel> Event::OnPartChannel(nullptr, "OnPartChannel"); -EventHandlers<LeaveChannel> Event::OnLeaveChannel(nullptr, "OnLeaveChannel"); -EventHandlers<JoinChannel> Event::OnJoinChannel(nullptr, "OnJoinChannel"); -EventHandlers<TopicUpdated> Event::OnTopicUpdated(nullptr, "OnTopicUpdated"); -EventHandlers<PreServerConnect> Event::OnPreServerConnect(nullptr, "OnPreServerConnect"); -EventHandlers<ServerConnect> Event::OnServerConnect(nullptr, "OnServerConnect"); -EventHandlers<PreUplinkSync> Event::OnPreUplinkSync(nullptr, "OnPreUplinkSync"); -EventHandlers<ServerDisconnect> Event::OnServerDisconnect(nullptr, "OnServerDisconnect"); -EventHandlers<Restart> Event::OnRestart(nullptr, "OnRestart"); -EventHandlers<Shutdown> Event::OnShutdown(nullptr, "OnShutdown"); -EventHandlers<AddXLine> Event::OnAddXLine(nullptr, "OnAddXLine"); -EventHandlers<DelXLine> Event::OnDelXLine(nullptr, "OnDelXLine"); -EventHandlers<IsServicesOperEvent> Event::OnIsServicesOper(nullptr, "OnIsServicesOper"); -EventHandlers<ServerQuit> Event::OnServerQuit(nullptr, "OnServerQuit"); -EventHandlers<UserQuit> Event::OnUserQuit(nullptr, "OnUserQuit"); -EventHandlers<PreUserLogoff> Event::OnPreUserLogoff(nullptr, "OnPreUserLogoff"); -EventHandlers<PostUserLogoff> Event::OnPostUserLogoff(nullptr, "OnPostUserLogoff"); -EventHandlers<AccessDel> Event::OnAccessDel(nullptr, "OnAccessDel"); -EventHandlers<AccessAdd> Event::OnAccessAdd(nullptr, "OnAccessAdd"); -EventHandlers<AccessClear> Event::OnAccessClear(nullptr, "OnAccessClear"); -EventHandlers<ChanRegistered> Event::OnChanRegistered(nullptr, "OnChanRegistered"); -EventHandlers<CreateChan> Event::OnCreateChan(nullptr, "OnCreateChan"); -EventHandlers<DelChan> Event::OnDelChan(nullptr, "OnDelChan"); -EventHandlers<ChannelCreate> Event::OnChannelCreate(nullptr, "OnChannelCreate"); -EventHandlers<ChannelDelete> Event::OnChannelDelete(nullptr, "OnChannelDelete"); -EventHandlers<CheckKick> Event::OnCheckKick(nullptr, "OnCheckKick"); -EventHandlers<CheckPriv> Event::OnCheckPriv(nullptr, "OnCheckPriv"); -EventHandlers<GroupCheckPriv> Event::OnGroupCheckPriv(nullptr, "OnGroupCheckPriv"); -EventHandlers<NickIdentify> Event::OnNickIdentify(nullptr, "OnNickIdentify"); -EventHandlers<UserLogin> Event::OnUserLogin(nullptr, "OnUserLogin"); -EventHandlers<NickLogout> Event::OnNickLogout(nullptr, "OnNickLogout"); -EventHandlers<DelNick> Event::OnDelNick(nullptr, "OnDelNick"); -EventHandlers<NickCoreCreate> Event::OnNickCoreCreate(nullptr, "OnNickCoreCreate"); -EventHandlers<DelCore> Event::OnDelCore(nullptr, "OnDelCore"); -EventHandlers<ChangeCoreDisplay> Event::OnChangeCoreDisplay(nullptr, "OnChangeCoreDisplay"); -EventHandlers<NickClearAccess> Event::OnNickClearAccess(nullptr, "OnNickClearAccess"); -EventHandlers<NickAddAccess> Event::OnNickAddAccess(nullptr, "OnNickAddAccess"); -EventHandlers<NickEraseAccess> Event::OnNickEraseAccess(nullptr, "OnNickEraseAccess"); -EventHandlers<CheckAuthentication> Event::OnCheckAuthentication(nullptr, "OnCheckAuthentication"); -EventHandlers<Fingerprint> Event::OnFingerprint(nullptr, "OnFingerprint"); -EventHandlers<UserAway> Event::OnUserAway(nullptr, "OnUserAway"); -EventHandlers<Invite> Event::OnInvite(nullptr, "OnInvite"); -EventHandlers<SetVhost> Event::OnSetVhost(nullptr, "OnSetVhost"); -EventHandlers<SetDisplayedHost> Event::OnSetDisplayedHost(nullptr, "OnSetDisplayedHost"); -EventHandlers<ChannelModeSet> Event::OnChannelModeSet(nullptr, "OnChannelModeSet"); -EventHandlers<ChannelModeUnset> Event::OnChannelModeUnset(nullptr, "OnChannelModeUnset"); -EventHandlers<UserModeSet> Event::OnUserModeSet(nullptr, "OnUserModeSet"); -EventHandlers<UserModeUnset> Event::OnUserModeUnset(nullptr, "OnUserModeUnset"); -EventHandlers<ChannelModeAdd> Event::OnChannelModeAdd(nullptr, "OnChannelModeAdd"); -EventHandlers<UserModeAdd> Event::OnUserModeAdd(nullptr, "OnUserModeAdd"); -EventHandlers<ModuleLoad> Event::OnModuleLoad(nullptr, "OnModuleLoad"); -EventHandlers<ModuleUnload> Event::OnModuleUnload(nullptr, "OnModuleUnload"); -EventHandlers<ServerSync> Event::OnServerSync(nullptr, "OnServerSync"); -EventHandlers<UplinkSync> Event::OnUplinkSync(nullptr, "OnUplinkSync"); -EventHandlers<BotPrivmsg> Event::OnBotPrivmsg(nullptr, "OnBotPrivmsg"); -EventHandlers<BotNotice> Event::OnBotNotice(nullptr, "OnBotNotice"); -EventHandlers<Privmsg> Event::OnPrivmsg(nullptr, "OnPrivmsg"); -EventHandlers<Event::Log> Event::OnLog(nullptr, "OnLog"); -EventHandlers<LogMessage> Event::OnLogMessage(nullptr, "OnLogMessage"); -EventHandlers<CheckModes> Event::OnCheckModes(nullptr, "OnCheckModes"); -EventHandlers<ChannelSync> Event::OnChannelSync(nullptr, "OnChannelSync"); -EventHandlers<SetCorrectModes> Event::OnSetCorrectModes(nullptr, "OnSetCorrectModes"); -EventHandlers<Message> Event::OnMessage(nullptr, "OnMessage"); -EventHandlers<CanSet> Event::OnCanSet(nullptr, "OnCanSet"); -EventHandlers<CheckDelete> Event::OnCheckDelete(nullptr, "OnCheckDelete"); -EventHandlers<ExpireTick> Event::OnExpireTick(nullptr, "OnExpireTick"); -EventHandlers<SerializeEvents> Event::OnSerialize(nullptr, "OnSerialize"); +EventHandlers<PreUserKicked> Event::OnPreUserKicked(nullptr); +EventHandlers<UserKicked> Event::OnUserKicked(nullptr); +EventHandlers<PreBotAssign> Event::OnPreBotAssign(nullptr); +EventHandlers<BotAssign> Event::OnBotAssign(nullptr); +EventHandlers<BotUnAssign> Event::OnBotUnAssign(nullptr); +EventHandlers<UserConnect> Event::OnUserConnect(nullptr); +EventHandlers<NewServer> Event::OnNewServer(nullptr); +EventHandlers<UserNickChange> Event::OnUserNickChange(nullptr); +EventHandlers<PreCommand> Event::OnPreCommand(nullptr); +EventHandlers<PostCommand> Event::OnPostCommand(nullptr); +EventHandlers<SaveDatabase> Event::OnSaveDatabase(nullptr); +EventHandlers<LoadDatabase> Event::OnLoadDatabase(nullptr); +EventHandlers<Encrypt> Event::OnEncrypt(nullptr); +EventHandlers<Decrypt> Event::OnDecrypt(nullptr); +EventHandlers<CreateBot> Event::OnCreateBot(nullptr); +EventHandlers<DelBot> Event::OnDelBot(nullptr); +EventHandlers<PrePartChannel> Event::OnPrePartChannel(nullptr); +EventHandlers<PartChannel> Event::OnPartChannel(nullptr); +EventHandlers<LeaveChannel> Event::OnLeaveChannel(nullptr); +EventHandlers<JoinChannel> Event::OnJoinChannel(nullptr); +EventHandlers<TopicUpdated> Event::OnTopicUpdated(nullptr); +EventHandlers<PreServerConnect> Event::OnPreServerConnect(nullptr); +EventHandlers<ServerConnect> Event::OnServerConnect(nullptr); +EventHandlers<PreUplinkSync> Event::OnPreUplinkSync(nullptr); +EventHandlers<ServerDisconnect> Event::OnServerDisconnect(nullptr); +EventHandlers<Restart> Event::OnRestart(nullptr); +EventHandlers<Shutdown> Event::OnShutdown(nullptr); +EventHandlers<AddXLine> Event::OnAddXLine(nullptr); +EventHandlers<DelXLine> Event::OnDelXLine(nullptr); +EventHandlers<IsServicesOperEvent> Event::OnIsServicesOper(nullptr); +EventHandlers<ServerQuit> Event::OnServerQuit(nullptr); +EventHandlers<UserQuit> Event::OnUserQuit(nullptr); +EventHandlers<PreUserLogoff> Event::OnPreUserLogoff(nullptr); +EventHandlers<PostUserLogoff> Event::OnPostUserLogoff(nullptr); +EventHandlers<AccessDel> Event::OnAccessDel(nullptr); +EventHandlers<AccessAdd> Event::OnAccessAdd(nullptr); +EventHandlers<AccessClear> Event::OnAccessClear(nullptr); +EventHandlers<ChanRegistered> Event::OnChanRegistered(nullptr); +EventHandlers<CreateChan> Event::OnCreateChan(nullptr); +EventHandlers<DelChan> Event::OnDelChan(nullptr); +EventHandlers<ChannelCreate> Event::OnChannelCreate(nullptr); +EventHandlers<ChannelDelete> Event::OnChannelDelete(nullptr); +EventHandlers<CheckKick> Event::OnCheckKick(nullptr); +EventHandlers<CheckPriv> Event::OnCheckPriv(nullptr); +EventHandlers<GroupCheckPriv> Event::OnGroupCheckPriv(nullptr); +EventHandlers<NickIdentify> Event::OnNickIdentify(nullptr); +EventHandlers<UserLogin> Event::OnUserLogin(nullptr); +EventHandlers<NickLogout> Event::OnNickLogout(nullptr); +EventHandlers<DelNick> Event::OnDelNick(nullptr); +EventHandlers<NickCoreCreate> Event::OnNickCoreCreate(nullptr); +EventHandlers<DelCore> Event::OnDelCore(nullptr); +EventHandlers<ChangeCoreDisplay> Event::OnChangeCoreDisplay(nullptr); +EventHandlers<NickClearAccess> Event::OnNickClearAccess(nullptr); +EventHandlers<NickAddAccess> Event::OnNickAddAccess(nullptr); +EventHandlers<NickEraseAccess> Event::OnNickEraseAccess(nullptr); +EventHandlers<CheckAuthentication> Event::OnCheckAuthentication(nullptr); +EventHandlers<Fingerprint> Event::OnFingerprint(nullptr); +EventHandlers<UserAway> Event::OnUserAway(nullptr); +EventHandlers<Invite> Event::OnInvite(nullptr); +EventHandlers<SetVhost> Event::OnSetVhost(nullptr); +EventHandlers<SetDisplayedHost> Event::OnSetDisplayedHost(nullptr); +EventHandlers<ChannelModeSet> Event::OnChannelModeSet(nullptr); +EventHandlers<ChannelModeUnset> Event::OnChannelModeUnset(nullptr); +EventHandlers<UserModeSet> Event::OnUserModeSet(nullptr); +EventHandlers<UserModeUnset> Event::OnUserModeUnset(nullptr); +EventHandlers<ChannelModeAdd> Event::OnChannelModeAdd(nullptr); +EventHandlers<UserModeAdd> Event::OnUserModeAdd(nullptr); +EventHandlers<ModuleLoad> Event::OnModuleLoad(nullptr); +EventHandlers<ModuleUnload> Event::OnModuleUnload(nullptr); +EventHandlers<ServerSync> Event::OnServerSync(nullptr); +EventHandlers<UplinkSync> Event::OnUplinkSync(nullptr); +EventHandlers<BotPrivmsg> Event::OnBotPrivmsg(nullptr); +EventHandlers<BotNotice> Event::OnBotNotice(nullptr); +EventHandlers<Privmsg> Event::OnPrivmsg(nullptr); +EventHandlers<Event::Log> Event::OnLog(nullptr); +EventHandlers<LogMessage> Event::OnLogMessage(nullptr); +EventHandlers<CheckModes> Event::OnCheckModes(nullptr); +EventHandlers<ChannelSync> Event::OnChannelSync(nullptr); +EventHandlers<SetCorrectModes> Event::OnSetCorrectModes(nullptr); +EventHandlers<Message> Event::OnMessage(nullptr); +EventHandlers<CanSet> Event::OnCanSet(nullptr); +EventHandlers<CheckDelete> Event::OnCheckDelete(nullptr); +EventHandlers<ExpireTick> Event::OnExpireTick(nullptr); +EventHandlers<SerializeEvents> Event::OnSerialize(nullptr); |
