diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 18:30:43 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-04 18:30:43 +0000 |
commit | cadc11999ee28545e9beb92de116c151832af5c4 (patch) | |
tree | e27660a07fd714673cf774e9215ff0edd839784e /src | |
parent | c08446c3ab58782b05740d2c2bfda523acd8aeb2 (diff) |
Convert all to new Attach() system. The Implements() method needs removing from all modules as it is dead weight.
WARNING: there are segfaults here! HERE BE DRAGONS, i am not finished!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8510 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
137 files changed, 262 insertions, 3 deletions
diff --git a/src/modules.cpp b/src/modules.cpp index cf26c8e11..adbc4fce7 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -319,10 +319,13 @@ bool ModuleManager::SetPriority(Module* mod, Implementation i, PriorityState s, break; } - if (swap) + if (swap && (swap_pos != source)) + { std::swap(EventHandlers[i][swap_pos], EventHandlers[i][source]); - - Instance->Log(DEBUG,"Swap locations %u and %u", swap_pos, source); + Instance->Log(DEBUG,"Swap locations %u and %u", swap_pos, source); + } + else + Instance->Log(DEBUG,"No need to swap"); return true; } diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index b1aa8e19a..6cae0badf 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -55,6 +55,7 @@ class ModuleFilterPCRE : public FilterBase : FilterBase(Me, "m_filter_pcre.so") { OnRehash(NULL,""); + } virtual ~ModuleFilterPCRE() diff --git a/src/modules/extra/m_httpclienttest.cpp b/src/modules/extra/m_httpclienttest.cpp index c5fe85a22..0168cbc72 100644 --- a/src/modules/extra/m_httpclienttest.cpp +++ b/src/modules/extra/m_httpclienttest.cpp @@ -27,6 +27,8 @@ public: MyModule(InspIRCd* Me) : Module::Module(Me) { + Implementation eventlist[] = { I_OnRequest, I_OnUserJoin, I_OnUserPart }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~MyModule() diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 1feb3b02b..a033d13e7 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -739,6 +739,8 @@ class ModuleSQL : public Module } ServerInstance->Modules->PublishInterface("SQL", this); + Implementation eventlist[] = { I_OnRehash, I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleSQL() diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 34e653e2a..434f30539 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -737,6 +737,8 @@ class ModulePgSQL : public Module ReadConf(); ServerInstance->Modules->PublishInterface("SQL", this); + Implementation eventlist[] = { I_OnUnloadModule, I_OnRequest, I_OnRehash, I_OnUserRegister, I_OnCheckReady, I_OnUserDisconnect }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual ~ModulePgSQL() diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 76ce4850a..f8e1cf34e 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -52,6 +52,8 @@ public: throw ModuleException("Can't find an SQL provider module. Please load one before attempting to load m_sqlauth."); OnRehash(NULL,""); + Implementation eventlist[] = { I_OnUserDisconnect, I_OnCheckReady, I_OnRequest, I_OnRehash, I_OnUserRegister }; + ServerInstance->Modules->Attach(eventlist, this, 5); } virtual ~ModuleSQLAuth() diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 2ca271884..091340d54 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -480,6 +480,8 @@ class ModuleSQLite3 : public Module ReadConf(); ServerInstance->Modules->PublishInterface("SQL", this); + Implementation eventlist[] = { I_OnRequest, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleSQLite3() diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 4f3256524..c127adbaa 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -200,6 +200,10 @@ class ModuleSQLLog : public Module OnRehash(NULL,""); MyMod = this; active_queries.clear(); + + Implementation eventlist[] = { I_OnRehash, I_OnOper, I_OnGlobalOper, I_OnKill, + I_OnPreCommand, I_OnUserConnect, I_OnUserQuit, I_OnLoadModule, I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 9); } virtual ~ModuleSQLLog() diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 2bfedc911..6e7d2a44a 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -49,6 +49,8 @@ public: throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqloper.so."); OnRehash(NULL,""); + Implementation eventlist[] = { I_OnRequest, I_OnRehash, I_OnPreCommand }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleSQLOper() diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp index 07cecc698..39cb97606 100644 --- a/src/modules/extra/m_sqlutils.cpp +++ b/src/modules/extra/m_sqlutils.cpp @@ -38,6 +38,8 @@ public: : Module::Module(Me) { ServerInstance->Modules->PublishInterface("SQLutils", this); + Implementation eventlist[] = { I_OnChannelDelete, I_OnUnloadModule, I_OnRequest, I_OnUserDisconnect }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual ~ModuleSQLutils() diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 2d806dd4e..1c56e9660 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -110,6 +110,9 @@ class ModuleSSLGnuTLS : public Module // Void return, guess we assume success gnutls_certificate_set_dh_params(x509_cred, dh_params); + Implementation eventlist[] = { I_On005Numeric, I_OnRawSocketConnect, I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnCleanup, + I_OnBufferFlushed, I_OnRequest, I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnUnloadModule, I_OnRehash, I_OnWhois, I_OnPostConnect }; + ServerInstance->Modules->Attach(eventlist, this, 15); } virtual void OnRehash(User* user, const std::string ¶m) diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 7d6f24cb3..2a81aed72 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -153,6 +153,9 @@ class ModuleSSLOpenSSL : public Module // Needs the flag as it ignores a plain /rehash OnRehash(NULL,"ssl"); + Implementation eventlist[] = { I_OnRawSocketConnect, I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnCleanup, I_On005Numeric, + I_OnBufferFlushed, I_OnRequest, I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnUnloadModule, I_OnRehash, I_OnWhois, I_OnPostConnect }; + ServerInstance->Modules->Attach(eventlist, this, 15); } virtual void OnRehash(User* user, const std::string ¶m) diff --git a/src/modules/extra/m_ssl_oper_cert.cpp b/src/modules/extra/m_ssl_oper_cert.cpp index 38dbb8f20..ae79e6b14 100644 --- a/src/modules/extra/m_ssl_oper_cert.cpp +++ b/src/modules/extra/m_ssl_oper_cert.cpp @@ -82,6 +82,8 @@ class ModuleOperSSLCert : public Module mycommand = new cmd_fingerprint(ServerInstance); ServerInstance->AddCommand(mycommand); cf = new ConfigReader(ServerInstance); + Implementation eventlist[] = { I_OnPreCommand, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleOperSSLCert() diff --git a/src/modules/extra/m_sslinfo.cpp b/src/modules/extra/m_sslinfo.cpp index d87ac64e3..2c28cf5d0 100644 --- a/src/modules/extra/m_sslinfo.cpp +++ b/src/modules/extra/m_sslinfo.cpp @@ -74,6 +74,7 @@ class ModuleSSLInfo : public Module newcommand = new cmd_sslinfo(ServerInstance); ServerInstance->AddCommand(newcommand); + } void Implements(char* List) diff --git a/src/modules/extra/m_testclient.cpp b/src/modules/extra/m_testclient.cpp index e7c7c35bc..016e454b7 100644 --- a/src/modules/extra/m_testclient.cpp +++ b/src/modules/extra/m_testclient.cpp @@ -27,6 +27,8 @@ public: ModuleTestClient(InspIRCd* Me) : Module::Module(Me) { + Implementation eventlist[] = { I_OnRequest, I_OnBackgroundTimer }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp index 89262817a..fce65d97e 100644 --- a/src/modules/extra/m_ziplink.cpp +++ b/src/modules/extra/m_ziplink.cpp @@ -154,6 +154,8 @@ class ModuleZLib : public Module total_out_compressed = total_in_compressed = 0; total_out_uncompressed = total_out_uncompressed = 0; + Implementation eventlist[] = { I_OnRawSocketConnect, I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnStats, I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 7); } virtual ~ModuleZLib() diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 94891af7c..81ae04f86 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -78,6 +78,7 @@ class ModuleAlias : public Module Me->Modules->Attach(I_OnPreCommand, this); Me->Modules->Attach(I_OnRehash, this); + } virtual ~ModuleAlias() diff --git a/src/modules/m_alltime.cpp b/src/modules/m_alltime.cpp index 48b54137e..6dc5bb6d3 100644 --- a/src/modules/m_alltime.cpp +++ b/src/modules/m_alltime.cpp @@ -67,6 +67,7 @@ class Modulealltime : public Module { mycommand = new CommandAlltime(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~Modulealltime() diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index aecf143ec..db7ff7704 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -24,6 +24,8 @@ class ModuleAntiBear : public Module ModuleAntiBear(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnUserRegister, I_OnPreCommand }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleAntiBear() diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp index 46b152948..e77cacb35 100644 --- a/src/modules/m_antibottler.cpp +++ b/src/modules/m_antibottler.cpp @@ -22,6 +22,8 @@ class ModuleAntiBottler : public Module : Module(Me) { + Implementation eventlist[] = { I_OnPreCommand }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 61c00c158..5798ecb2c 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -61,6 +61,7 @@ class ModuleAuditorium : public Module Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnRehash }; Me->Modules->Attach(eventlist, this, 6); + } virtual ~ModuleAuditorium() diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index cacba3150..2066cc524 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -53,6 +53,7 @@ public: //be->DoImplements(List); Implementation list[] = { I_OnRehash, I_OnRequest, I_On005Numeric, I_OnCheckBan }; Me->Modules->Attach(list, this, 4); + } virtual void On005Numeric(std::string &output) diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 4a7db8052..f74c75623 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -200,6 +200,7 @@ class ModuleBanRedirect : public Module Implementation list[] = { I_OnRehash, I_OnUserPreJoin, I_OnChannelDelete, I_OnCleanup }; Me->Modules->Attach(list, this, sizeof(list)); + } virtual void OnChannelDelete(Channel* chan) diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 44f59f347..9a6d6e34a 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -49,6 +49,8 @@ class ModuleBlockAmsg : public Module { this->OnRehash(NULL,""); + Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_OnCleanup }; + ServerInstance->Modules->Attach(eventlist, this, 3); } void Implements(char* List) diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index ec5f901e1..4b28f35d0 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -60,6 +60,8 @@ public: bc = new BlockCaps(ServerInstance); if (!ServerInstance->AddMode(bc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 3); } void Implements(char* List) diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index 369e719b0..ae364725c 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -56,6 +56,8 @@ class ModuleBlockColour : public Module bc = new BlockColor(ServerInstance); if (!ServerInstance->AddMode(bc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 18a594c31..5b56ceabe 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -57,6 +57,8 @@ class ModuleBotMode : public Module bm = new BotMode(ServerInstance); if (!ServerInstance->AddMode(bm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnWhois }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index a978d2fd9..f43f26bb8 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -127,6 +127,8 @@ class ModuleCBan : public Module mycommand = new CommandCban(Me); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnUserPreJoin, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 4); } void Implements(char* List) diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 03c5bfb69..9fc9a9134 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -99,6 +99,8 @@ class ModuleCensor : public Module cc = new CensorChannel(ServerInstance); if (!ServerInstance->AddMode(cu) || !ServerInstance->AddMode(cc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 3); } void Implements(char* List) diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 67f328166..16faf4f29 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -133,6 +133,8 @@ public: OnRehash(NULL,""); mycommand=new CommandWebirc(Me, Hosts, NotifyOpers); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCleanup, I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnUserQuit, I_OnUserConnect }; + ServerInstance->Modules->Attach(eventlist, this, 7); } void Implements(char* List) diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index d2b0b4e45..6c332cdcd 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -23,6 +23,8 @@ class ModuleChanCreate : public Module : Module(Me) { ServerInstance->SNO->EnableSnomask('j', "CHANCREATE"); + Implementation eventlist[] = { I_OnUserJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleChanCreate() diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index 6280280e3..c5786b6f7 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -68,6 +68,8 @@ class ModuleChanFilter : public Module cf = new ChanFilter(ServerInstance); if (!ServerInstance->AddMode(cf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel }; + ServerInstance->Modules->Attach(eventlist, this, 6); } void Implements(char* List) diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index 4f4ace1e7..67ccfccd6 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -311,6 +311,8 @@ class ModuleChanProtect : public Module if (!ServerInstance->AddMode(cp) || !ServerInstance->AddMode(cf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserKick, I_OnUserPart, I_OnRehash, I_OnUserPreJoin, I_OnPostJoin, I_OnAccessCheck, I_OnSyncChannel }; + ServerInstance->Modules->Attach(eventlist, this, 7); } void Implements(char* List) diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index b505f10ee..8c4aa5353 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -164,6 +164,7 @@ class ModuleCheck : public Module mycommand = new CommandCheck(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleCheck() diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index e13dc1c31..71fd678b3 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -84,6 +84,8 @@ class ModuleChgHost : public Module OnRehash(NULL,""); mycommand = new CommandChghost(ServerInstance, hostmap); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_chgident.cpp b/src/modules/m_chgident.cpp index 42a4ef747..a6ef4e7ba 100644 --- a/src/modules/m_chgident.cpp +++ b/src/modules/m_chgident.cpp @@ -76,6 +76,7 @@ public: { mycommand = new CommandChgident(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleChgIdent() diff --git a/src/modules/m_chgname.cpp b/src/modules/m_chgname.cpp index dc90b016b..8e2a735d0 100644 --- a/src/modules/m_chgname.cpp +++ b/src/modules/m_chgname.cpp @@ -72,6 +72,7 @@ public: { mycommand = new CommandChgname(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleChgName() diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 99cf1dc0f..976ad7d4f 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -334,6 +334,8 @@ class ModuleCloaking : public Module throw ModuleException("Could not add new modes!"); OnRehash(NULL,""); + Implementation eventlist[] = { I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleCloaking() diff --git a/src/modules/m_clones.cpp b/src/modules/m_clones.cpp index 8f47a6432..654de81f3 100644 --- a/src/modules/m_clones.cpp +++ b/src/modules/m_clones.cpp @@ -76,6 +76,7 @@ class ModuleClones : public Module mycommand = new CommandClones(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleClones() diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp index 7a823e799..d85b5b111 100644 --- a/src/modules/m_close.cpp +++ b/src/modules/m_close.cpp @@ -63,6 +63,7 @@ class ModuleClose : public Module // Create a new command newcommand = new CommandClose(ServerInstance); ServerInstance->AddCommand(newcommand); + } virtual ~ModuleClose() diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index c9225e1b7..631fd2b2b 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -54,6 +54,8 @@ class ModulePrivacyMode : public Module pm = new PrivacyMode(ServerInstance); if (!ServerInstance->AddMode(pm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index 42bf8eadc..f9c942375 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -46,6 +46,8 @@ class ModuleConnJoin : public Module : Module(Me) { OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnPostConnect, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Prioritize() diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp index 34e1fd34d..2a15df0ea 100644 --- a/src/modules/m_conn_umodes.cpp +++ b/src/modules/m_conn_umodes.cpp @@ -28,6 +28,8 @@ class ModuleModesOnConnect : public Module { Conf = new ConfigReader(ServerInstance); + Implementation eventlist[] = { I_OnPostConnect, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index 4ab3ed793..12ab91c34 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -26,6 +26,8 @@ class ModuleWaitPong : public Module : Module(Me), extenstr("waitpong_pingstr") { OnRehash(NULL,""); + Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash, I_OnUserDisconnect, I_OnCleanup }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual void OnRehash(User* user, const std::string ¶m) diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index d6d9eee0f..4d062a18e 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -32,6 +32,8 @@ public: { InitConf(); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleConnFlood() diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index da28ea8af..fa49a1a75 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -118,6 +118,8 @@ class ModuleCustomTitle : public Module mycommand = new CommandTitle(ServerInstance); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnDecodeMetaData, I_OnWhoisLine, I_OnSyncUserMetaData, I_OnUserQuit, I_OnCleanup }; + ServerInstance->Modules->Attach(eventlist, this, 5); } void Implements(char* List) diff --git a/src/modules/m_cycle.cpp b/src/modules/m_cycle.cpp index c271f024c..d190eda3c 100644 --- a/src/modules/m_cycle.cpp +++ b/src/modules/m_cycle.cpp @@ -87,6 +87,7 @@ class ModuleCycle : public Module mycommand = new CommandCycle(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleCycle() diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 2b67654cc..e1fe7143b 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -255,6 +255,8 @@ class ModuleDCCAllow : public Module mycommand = new CommandDccallow(ServerInstance); ServerInstance->AddCommand(mycommand); ReadFileConf(); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserQuit, I_OnUserPreNick, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 5); } void Implements(char* List) diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 44479c21b..55cbd2830 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -64,6 +64,8 @@ class ModuleDeaf : public Module throw ModuleException("Could not add new modes!"); OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash, I_OnBuildExemptList }; + ServerInstance->Modules->Attach(eventlist, this, 4); } void Implements(char* List) diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index d978921a1..18ae5c289 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -67,6 +67,8 @@ class ModuleDelayJoin : public Module djm = new DelayJoinMode(ServerInstance, this); if (!ServerInstance->AddMode(djm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnUserQuit, I_OnUserList, I_OnText }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual ~ModuleDelayJoin() diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index d345570c0..e0b3829bd 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -28,6 +28,8 @@ class ModuleDenyChannels : public Module { Conf = new ConfigReader(ServerInstance); + Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual void OnRehash(User* user, const std::string ¶m) diff --git a/src/modules/m_devoice.cpp b/src/modules/m_devoice.cpp index c11c95f85..2ff1c98ea 100644 --- a/src/modules/m_devoice.cpp +++ b/src/modules/m_devoice.cpp @@ -61,6 +61,7 @@ class ModuleDeVoice : public Module mycommand = new CommandDevoice(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleDeVoice() diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 987995271..98de1082b 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -201,6 +201,8 @@ class ModuleDNSBL : public Module ModuleDNSBL(InspIRCd *Me) : Module(Me) { ReadConf(); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleDNSBL() diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 129bce276..abf4e0ddd 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -29,6 +29,7 @@ class ModuleFilter : public FilterBase : FilterBase(Me, "m_filter.so") { OnRehash(NULL,""); + } virtual ~ModuleFilter() diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp index 91afe9df7..1e47cfcbc 100644 --- a/src/modules/m_foobar.cpp +++ b/src/modules/m_foobar.cpp @@ -35,6 +35,8 @@ class ModuleFoobar : public Module // The constructor just makes a copy of the server class + Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual ~ModuleFoobar() diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp index 1c2b47a48..f5f63f58a 100644 --- a/src/modules/m_globalload.cpp +++ b/src/modules/m_globalload.cpp @@ -135,6 +135,7 @@ class ModuleGlobalLoad : public Module ServerInstance->AddCommand(mycommand); ServerInstance->AddCommand(mycommand2); ServerInstance->AddCommand(mycommand3); + } virtual ~ModuleGlobalLoad() diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp index fe4279213..895e51adb 100644 --- a/src/modules/m_globops.cpp +++ b/src/modules/m_globops.cpp @@ -53,6 +53,7 @@ class ModuleGlobops : public Module mycommand = new CommandGlobops(ServerInstance); ServerInstance->AddCommand(mycommand); ServerInstance->SNO->EnableSnomask('g',"GLOBOPS"); + } virtual ~ModuleGlobops() diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index a5430d7da..633dc5399 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -119,6 +119,8 @@ class ModuleHelpop : public Module throw ModuleException("Could not add new modes!"); mycommand = new CommandHelpop(ServerInstance); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnWhois }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual void ReadConfig() diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index 42614e937..cb910aa4b 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -61,6 +61,8 @@ class ModuleHideChans : public Module hm = new HideChans(ServerInstance); if (!ServerInstance->AddMode(hm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnWhoisLine }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index a2a3f21cd..33732481a 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -60,6 +60,8 @@ class ModuleHideOper : public Module hm = new HideOper(ServerInstance); if (!ServerInstance->AddMode(hm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnWhoisLine }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 222d68dca..cd89d7cfd 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -41,6 +41,8 @@ class ModuleHostChange : public Module : Module(Me) { OnRehash(NULL,""); + Implementation eventlist[] = { I_OnRehash, I_OnUserConnect }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleHostChange() diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp index 3f424b595..c76d88f9e 100644 --- a/src/modules/m_http_client.cpp +++ b/src/modules/m_http_client.cpp @@ -79,6 +79,8 @@ class ModuleHTTPClient : public Module ModuleHTTPClient(InspIRCd *Me) : Module(Me) { + Implementation eventlist[] = { I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleHTTPClient() diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index bb6c6d786..5d8d1f764 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -474,6 +474,8 @@ class ModuleHttpServer : public Module { ReadConfig(); HttpModule = this; + Implementation eventlist[] = { I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 1); } char* OnRequest(Request* request) diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 2d022ad30..1022d1563 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -46,6 +46,8 @@ class ModuleHttpStats : public Module { ReadConfig(); this->changed = true; + Implementation eventlist[] = { I_OnEvent, I_OnRequest, I_OnChannelDelete, I_OnUserJoin, I_OnUserPart, I_OnUserQuit }; + ServerInstance->Modules->Attach(eventlist, this, 6); } void InsertOrder(irc::string channel, int count) diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 473de3417..75af9e192 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -344,6 +344,8 @@ class ModuleIdent : public Module : Module(Me) { OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCheckReady, I_OnCleanup, I_OnUserDisconnect }; + ServerInstance->Modules->Attach(eventlist, this, 5); } virtual Version GetVersion() diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index d1fa5162a..55a973f2e 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -167,6 +167,8 @@ class ModuleInvisible : public Module /* Yeah i know people can take this out. I'm not about to obfuscate code just to be a pain in the ass. */ ServerInstance->ServerNoticeAll("*** m_invisible.so has just been loaded on this network. For more information, please visit http://inspircd.org/wiki/Modules/invisible"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserJoin, I_OnUserPart, I_OnUserQuit, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual ~ModuleInvisible() diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 0450760d7..f89b4f1a3 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -47,6 +47,8 @@ public: if (!ServerInstance->AddMode(ie)) throw ModuleException("Could not add new modes!"); ServerInstance->Modules->PublishInterface("ChannelBanList", this); + Implementation eventlist[] = { I_OnRequest, I_On005Numeric, I_OnCheckInvite }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual void Implements(char* List) diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 15cc535c0..6b0b97bd5 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -218,6 +218,8 @@ class ModuleJoinFlood : public Module jf = new JoinFlood(ServerInstance); if (!ServerInstance->AddMode(jf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreJoin, I_OnUserJoin }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs) diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 9a88cfc45..a0294e0ff 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -129,6 +129,8 @@ class ModuleJumpServer : public Module js = new CommandJumpserver(ServerInstance); ServerInstance->AddCommand(js); + Implementation eventlist[] = { I_OnUserRegister }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleJumpServer() diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 02f452cba..6378ea773 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -126,6 +126,8 @@ public: kr = new KickRejoin(ServerInstance); if (!ServerInstance->AddMode(kr)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnCleanup, I_OnChannelDelete, I_OnUserPreJoin, I_OnUserKick }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs) diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 67aa50d49..c0056c29f 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -107,6 +107,7 @@ class ModuleKnock : public Module mycommand = new CommandKnock(ServerInstance); ServerInstance->AddCommand(mycommand); + } void Implements(char* List) diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index d2bfff6a5..5b188f96c 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -88,6 +88,8 @@ public: unlockcommand = new CommandUnlockserv(ServerInstance, locked); ServerInstance->AddCommand(unlockcommand); + Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleLockserv() diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index 0c8d531e0..8fe95dcb0 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -268,6 +268,8 @@ class ModuleMD5 : public Module : Module(Me), key(NULL), chars(NULL) { ServerInstance->Modules->PublishInterface("HashRequest", this); + Implementation eventlist[] = { I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleMD5() diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 45274c6e4..0e5ce84f9 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -211,6 +211,8 @@ class ModuleMsgFlood : public Module mf = new MsgFlood(ServerInstance); if (!ServerInstance->AddMode(mf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNotice, I_OnUserPreMessage }; + ServerInstance->Modules->Attach(eventlist, this, 3); } int ProcessMessages(User* user,Channel* dest, const std::string &text) diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 65fb6c6c2..e5ebf6909 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -24,6 +24,8 @@ class ModuleNamesX : public Module ModuleNamesX(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnSyncUserMetaData, I_OnPreCommand, I_OnUserList, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 4); } void Implements(char* List) diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index 181bbaa4c..7e5e6b2c5 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -217,6 +217,8 @@ class ModuleNickFlood : public Module jf = new NickFlood(ServerInstance); if (!ServerInstance->AddMode(jf)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnChannelDelete, I_OnUserPreNick }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual int OnUserPreNick(User* user, const std::string &newnick) diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 6f2e94cd4..74625da38 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -111,6 +111,8 @@ class ModuleNickLock : public Module cmd2 = new CommandNickunlock(ServerInstance); ServerInstance->AddCommand(cmd1); ServerInstance->AddCommand(cmd2); + Implementation eventlist[] = { I_OnUserPreNick, I_OnUserQuit, I_OnCleanup }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleNickLock() diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index b95835507..819c5c2f2 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -57,6 +57,8 @@ class ModuleNoCTCP : public Module nc = new NoCTCP(ServerInstance); if (!ServerInstance->AddMode(nc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index a276f6e35..1d970f110 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -53,6 +53,8 @@ class ModuleNoInvite : public Module ni = new NoInvite(ServerInstance); if (!ServerInstance->AddMode(ni)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreInvite }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 4cc269f1e..48ed9041f 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -57,6 +57,8 @@ class ModuleNoKicks : public Module nk = new NoKicks(ServerInstance); if (!ServerInstance->AddMode(nk)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnAccessCheck }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 1c8edf3bc..05b07c44f 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -53,6 +53,8 @@ class ModuleNoNickChange : public Module nn = new NoNicks(ServerInstance); ServerInstance->AddMode(nn); + Implementation eventlist[] = { I_OnUserPreNick }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleNoNickChange() diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index ecff94532..258dcab0f 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -56,6 +56,8 @@ class ModuleNoNotice : public Module nt = new NoNotice(ServerInstance); if (!ServerInstance->AddMode(nt)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp index fd7e683de..0d2164e9c 100644 --- a/src/modules/m_oper_hash.cpp +++ b/src/modules/m_oper_hash.cpp @@ -108,6 +108,8 @@ class ModuleOperHash : public Module mycommand = new CommandMkpasswd(ServerInstance, this, hashers, names); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnOperCompare }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleOperHash() diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 2171db860..76ead18c3 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -56,6 +56,8 @@ class ModuleOperChans : public Module oc = new OperChans(ServerInstance); if (!ServerInstance->AddMode(oc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_operflood.cpp b/src/modules/m_operflood.cpp index 02a6b85f2..2d5694a70 100644 --- a/src/modules/m_operflood.cpp +++ b/src/modules/m_operflood.cpp @@ -25,6 +25,8 @@ public: void Implements(char * List)
{
List[I_OnPostOper] = 1;
+ Implementation eventlist[] = { I_OnPostOper }; + ServerInstance->Modules->Attach(eventlist, this, 1); }
Version GetVersion()
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index ae92a1255..f0f98ea00 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -44,6 +44,8 @@ class ModuleOperjoin : public Module ModuleOperjoin(InspIRCd* Me) : Module(Me) { OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnPostOper, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp index c7fa0a642..8cebe2a7c 100644 --- a/src/modules/m_operlevels.cpp +++ b/src/modules/m_operlevels.cpp @@ -33,6 +33,8 @@ class ModuleOperLevels : public Module conf = new ConfigReader(ServerInstance); + Implementation eventlist[] = { I_OnRehash, I_OnKill }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleOperLevels() diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index 0ca13b2da..f537aa9d8 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -23,6 +23,8 @@ class ModuleOperLog : public Module ModuleOperLog(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnPreCommand, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleOperLog() diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index 1904b3f01..5841f36fd 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -28,6 +28,8 @@ class ModuleModesOnOper : public Module { Conf = new ConfigReader(ServerInstance); + Implementation eventlist[] = { I_OnPostOper, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index fbc72aeea..86d928cb7 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -83,6 +83,8 @@ class ModuleOpermotd : public Module ServerInstance->AddCommand(mycommand); opermotd = new FileReader(ServerInstance); LoadOperMOTD(); + Implementation eventlist[] = { I_OnRehash, I_OnOper }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleOpermotd() diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 41b57b327..224a18ae4 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -36,6 +36,8 @@ class ModuleOverride : public Module ServerInstance->SNO->EnableSnomask('O',"OVERRIDE"); OverriddenMode = false; OverOps = OverDeops = OverVoices = OverDevoices = OverHalfops = OverDehalfops = 0; + Implementation eventlist[] = { I_OnRehash, I_OnAccessCheck, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPostCommand }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual void OnRehash(User* user, const std::string ¶meter) diff --git a/src/modules/m_proxyscan.cpp b/src/modules/m_proxyscan.cpp index 59d265044..916a8d891 100644 --- a/src/modules/m_proxyscan.cpp +++ b/src/modules/m_proxyscan.cpp @@ -310,6 +310,8 @@ class ModuleProxy : public Module : Module(Me) { OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCleanup, I_OnUserDisconnect }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual Version GetVersion() diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index e4cb70a76..7dabb45e9 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -107,6 +107,8 @@ class ModuleRandQuote : public Module mycommand = new CommandRandquote(ServerInstance); ServerInstance->AddCommand(mycommand); } + Implementation eventlist[] = { I_OnUserConnect }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 0a4f43fd4..9d259604d 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -107,6 +107,8 @@ class ModuleRedirect : public Module re = new Redirect(ServerInstance); if (!ServerInstance->AddMode(re)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp index b02f9a391..51129494f 100644 --- a/src/modules/m_regonlycreate.cpp +++ b/src/modules/m_regonlycreate.cpp @@ -21,6 +21,8 @@ class ModuleRegOnlyCreate : public Module ModuleRegOnlyCreate(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 8be08db62..c3482da46 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -252,6 +252,8 @@ class ModuleRemove : public Module ServerInstance->AddCommand(mycommand); ServerInstance->AddCommand(mycommand2); OnRehash(NULL,""); + Implementation eventlist[] = { I_On005Numeric, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_restrictbanned.cpp b/src/modules/m_restrictbanned.cpp index a5a5ab1ae..855e7cc9b 100644 --- a/src/modules/m_restrictbanned.cpp +++ b/src/modules/m_restrictbanned.cpp @@ -21,6 +21,8 @@ class ModuleRestrictBanned : public Module public: ModuleRestrictBanned(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnLocalTopicChange, I_OnUserPreNick, I_OnUserPreNotice, I_OnUserPreMessage }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual ~ModuleRestrictBanned() diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp index e61e8ac0d..015025c03 100644 --- a/src/modules/m_restrictchans.cpp +++ b/src/modules/m_restrictchans.cpp @@ -41,6 +41,8 @@ class ModuleRestrictChans : public Module { ReadConfig(); + Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual void OnRehash(User* user, const std::string ¶meter) diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index b63d7c7b7..c9d9b3058 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -25,6 +25,8 @@ class ModuleRestrictMsg : public Module : Module(Me) { + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_rpc_json.cpp b/src/modules/m_rpc_json.cpp index b12de0891..8ef0d53a0 100644 --- a/src/modules/m_rpc_json.cpp +++ b/src/modules/m_rpc_json.cpp @@ -48,6 +48,8 @@ class ModuleRpcJson : public Module ModuleRpcJson(InspIRCd *Me) : Module(Me) { ServerInstance->Modules->PublishInterface("RPC", this); + Implementation eventlist[] = { I_OnEvent }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleRpcJson() diff --git a/src/modules/m_rpctest.cpp b/src/modules/m_rpctest.cpp index 1d3f2a71e..eef3f3939 100644 --- a/src/modules/m_rpctest.cpp +++ b/src/modules/m_rpctest.cpp @@ -27,6 +27,8 @@ class ModuleRPCTest : public Module public: ModuleRPCTest(InspIRCd *Me) : Module(Me) { + Implementation eventlist[] = { I_OnEvent }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleRPCTest() diff --git a/src/modules/m_safelist.cpp b/src/modules/m_safelist.cpp index 388781cee..3e739cc74 100644 --- a/src/modules/m_safelist.cpp +++ b/src/modules/m_safelist.cpp @@ -42,6 +42,8 @@ class ModuleSafeList : public Module ModuleSafeList(InspIRCd* Me) : Module(Me) { OnRehash(NULL, ""); + Implementation eventlist[] = { I_OnBufferFlushed, I_OnPreCommand, I_OnCleanup, I_OnUserQuit, I_On005Numeric, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 6); } virtual ~ModuleSafeList() diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp index 36eb9f15c..68f4fd0c0 100644 --- a/src/modules/m_sajoin.cpp +++ b/src/modules/m_sajoin.cpp @@ -96,6 +96,7 @@ class ModuleSajoin : public Module mycommand = new CommandSajoin(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSajoin() diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 0e922326e..773fdf631 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -76,6 +76,7 @@ class ModuleSaMode : public Module mycommand = new CommandSamode(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSaMode() diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 4011b6516..cc1e40d68 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -79,6 +79,7 @@ class ModuleSanick : public Module mycommand = new CommandSanick(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSanick() diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp index 3d24d60a9..13a9b0c90 100644 --- a/src/modules/m_sapart.cpp +++ b/src/modules/m_sapart.cpp @@ -94,6 +94,7 @@ class ModuleSapart : public Module mycommand = new CommandSapart(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSapart() diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 215a099c6..5334d7454 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -68,6 +68,7 @@ class ModuleSaquit : public Module mycommand = new CommandSaquit(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSaquit() diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index 01c8cb826..b9228df9d 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -24,6 +24,8 @@ class ModuleSecureList : public Module ModuleSecureList(InspIRCd* Me) : Module(Me) { OnRehash(NULL,""); + Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleSecureList() diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp index 82deda0cd..f65497f8d 100644 --- a/src/modules/m_seenicks.cpp +++ b/src/modules/m_seenicks.cpp @@ -23,6 +23,8 @@ class ModuleSeeNicks : public Module { ServerInstance->SNO->EnableSnomask('n',"NICK"); ServerInstance->SNO->EnableSnomask('N',"REMOTENICK"); + Implementation eventlist[] = { I_OnUserPostNick }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleSeeNicks() diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index 07d10aad5..ad5712ed1 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -186,6 +186,8 @@ class ModuleServices : public Module } kludgeme = false; + Implementation eventlist[] = { I_OnWhois, I_OnUserPostNick, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 5); } /* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */ diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index e5c62ae6c..eee4d881a 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -120,6 +120,11 @@ class ModuleServicesAccount : public Module m3 = new AUser_R(ServerInstance); if (!ServerInstance->AddMode(m1) || !ServerInstance->AddMode(m2) || !ServerInstance->AddMode(m3)) throw ModuleException("Could not add new modes!"); + + Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreJoin, + I_OnSyncUserMetaData, I_OnUserQuit, I_OnCleanup, I_OnDecodeMetaData }; + + ServerInstance->Modules->Attach(eventlist, this, 8); } /* <- :twisted.oscnet.org 330 w00t2 w00t2 w00t :is logged in as */ diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 6651f5362..a33b05c38 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -48,6 +48,8 @@ class ModuleServProtectMode : public Module bm = new ServProtectMode(ServerInstance); if (!ServerInstance->AddMode(bm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine }; + ServerInstance->Modules->Attach(eventlist, this, 3); } void Implements(char* List) diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 87b886661..7f0b3e1aa 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -72,6 +72,8 @@ class ModuleSetHost : public Module OnRehash(NULL,""); mycommand = new CommandSethost(ServerInstance, hostmap); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_setident.cpp b/src/modules/m_setident.cpp index 179053394..8d7980961 100644 --- a/src/modules/m_setident.cpp +++ b/src/modules/m_setident.cpp @@ -65,6 +65,7 @@ class ModuleSetIdent : public Module mycommand = new CommandSetident(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSetIdent() diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 9207ad796..847aa9111 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -57,6 +57,7 @@ class ModuleSetIdle : public Module mycommand = new CommandSetidle(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSetIdle() diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp index a139a0174..b15d52252 100644 --- a/src/modules/m_setname.cpp +++ b/src/modules/m_setname.cpp @@ -62,6 +62,7 @@ class ModuleSetName : public Module mycommand = new CommandSetname(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleSetName() diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp index 1be4551c8..618229c1a 100644 --- a/src/modules/m_sha256.cpp +++ b/src/modules/m_sha256.cpp @@ -242,6 +242,8 @@ class ModuleSHA256 : public Module ModuleSHA256(InspIRCd* Me) : Module(Me), key(NULL), chars(NULL) { ServerInstance->Modules->PublishInterface("HashRequest", this); + Implementation eventlist[] = { I_OnRequest }; + ServerInstance->Modules->Attach(eventlist, this, 1); } virtual ~ModuleSHA256() diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 02a74535c..322fc4a62 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -62,6 +62,8 @@ class ModuleShowwhois : public Module sw = new SeeWhois(ServerInstance); if (!ServerInstance->AddMode(sw)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnWhois }; + ServerInstance->Modules->Attach(eventlist, this, 1); } ~ModuleShowwhois() diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index b741105c7..703a17b43 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -135,6 +135,8 @@ class ModuleSilence : public Module OnRehash(NULL, ""); mycommand = new CommandSilence(ServerInstance, maxsilence); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage }; + ServerInstance->Modules->Attach(eventlist, this, 5); } void Implements(char* List) diff --git a/src/modules/m_silence_ext.cpp b/src/modules/m_silence_ext.cpp index 3cc40df2a..c2a32c706 100644 --- a/src/modules/m_silence_ext.cpp +++ b/src/modules/m_silence_ext.cpp @@ -241,6 +241,8 @@ class ModuleSilence : public Module OnRehash(NULL, ""); mycommand = new CommandSilence(ServerInstance,maxsilence); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnBuildExemptList, I_OnUserQuit, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage, I_OnUserPreInvite }; + ServerInstance->Modules->Attach(eventlist, this, 7); } virtual void OnRehash(User* user, const std::string ¶meter) diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 1fc2968b4..1afdd71b8 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -52,6 +52,16 @@ ModuleSpanningTree::ModuleSpanningTree(InspIRCd* Me) RefreshTimer = new CacheRefreshTimer(ServerInstance, Utils); ServerInstance->Timers->AddTimer(RefreshTimer); + Implementation eventlist[] = + { + I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostLocalTopicChange, + I_OnWallops, I_OnUserNotice, I_OnUserMessage, I_OnBackgroundTimer, + I_OnUserJoin, I_OnChangeHost, I_OnChangeName, I_OnUserPart, I_OnUserConnect, + I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRemoteKill, I_OnRehash, + I_OnOper, I_OnAddLine, I_OnDelLine, I_ProtoSendMode, I_OnMode, + I_OnStats, I_ProtoSendMetaData, I_OnEvent, I_OnSetAway, I_OnCancelAway, I_OnPostCommand + }; + ServerInstance->Modules->Attach(eventlist, this, 29); } void ModuleSpanningTree::ShowLinks(TreeServer* Current, User* user, int hops) diff --git a/src/modules/m_spy.cpp b/src/modules/m_spy.cpp index de26a7e23..4d5493337 100644 --- a/src/modules/m_spy.cpp +++ b/src/modules/m_spy.cpp @@ -140,6 +140,7 @@ class ModuleSpy : public Module mycommand2 = new CommandSpynames(ServerInstance); ServerInstance->AddCommand(mycommand); ServerInstance->AddCommand(mycommand2); + } virtual ~ModuleSpy() diff --git a/src/modules/m_ssl_dummy.cpp b/src/modules/m_ssl_dummy.cpp index 4a91feada..584e7a3ee 100644 --- a/src/modules/m_ssl_dummy.cpp +++ b/src/modules/m_ssl_dummy.cpp @@ -24,6 +24,8 @@ class ModuleSSLDummy : public Module ModuleSSLDummy(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnSyncUserMetaData, I_OnDecodeMetaData, I_OnWhois }; + ServerInstance->Modules->Attach(eventlist, this, 3); } virtual ~ModuleSSLDummy() diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 0cdb60697..2d770aafc 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -77,6 +77,8 @@ class ModuleSSLModes : public Module sslm = new SSLMode(ServerInstance); if (!ServerInstance->AddMode(sslm)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreJoin }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index 6e0100b46..7bbeaa8b6 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -94,6 +94,8 @@ class ModuleStripColor : public Module if (!ServerInstance->AddMode(usc) || !ServerInstance->AddMode(csc)) throw ModuleException("Could not add new modes!"); + Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice }; + ServerInstance->Modules->Attach(eventlist, this, 2); } void Implements(char* List) diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 3eff54cab..fdda0cb8e 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -159,6 +159,8 @@ class ModuleSVSHold : public Module { mycommand = new CommandSvshold(Me); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnUserPreNick, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 4); } void Implements(char* List) diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index cd82bce67..ff7c9d783 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -108,6 +108,8 @@ class ModuleSWhois : public Module Conf = new ConfigReader(ServerInstance); mycommand = new CommandSwhois(ServerInstance); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnDecodeMetaData, I_OnWhoisLine, I_OnSyncUserMetaData, I_OnUserQuit, I_OnCleanup, I_OnRehash, I_OnPostCommand }; + ServerInstance->Modules->Attach(eventlist, this, 7); } void OnRehash(User* user, const std::string ¶meter) diff --git a/src/modules/m_taxonomy.cpp b/src/modules/m_taxonomy.cpp index 1fb4f886e..439909ce2 100644 --- a/src/modules/m_taxonomy.cpp +++ b/src/modules/m_taxonomy.cpp @@ -65,6 +65,8 @@ class ModuleTaxonomy : public Module // Create a new command newcommand = new CommandTaxonomy(ServerInstance, this, claimed); ServerInstance->AddCommand(newcommand); + Implementation eventlist[] = { I_ProtoSendMetaData }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp index 2da77b34e..00c358882 100644 --- a/src/modules/m_testcommand.cpp +++ b/src/modules/m_testcommand.cpp @@ -43,6 +43,7 @@ class ModuleTestCommand : public Module // Create a new command newcommand = new CommandDalinfo(ServerInstance); ServerInstance->AddCommand(newcommand); + } void Implements(char* List) diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 30dda81f5..36adb7679 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -114,6 +114,8 @@ class ModuleTimedBans : public Module mycommand = new CommandTban(ServerInstance); ServerInstance->AddCommand(mycommand); TimedBanList.clear(); + Implementation eventlist[] = { I_OnDelBan, I_OnBackgroundTimer }; + ServerInstance->Modules->Attach(eventlist, this, 2); } virtual ~ModuleTimedBans() diff --git a/src/modules/m_tline.cpp b/src/modules/m_tline.cpp index 74bf3a634..a73de8b80 100644 --- a/src/modules/m_tline.cpp +++ b/src/modules/m_tline.cpp @@ -72,6 +72,7 @@ class ModuleTLine : public Module newcommand = new CommandTline(ServerInstance); ServerInstance->AddCommand(newcommand); + } void Implements(char* List) diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index 574f90741..40de3d884 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -25,6 +25,8 @@ class ModuleUHNames : public Module ModuleUHNames(InspIRCd* Me) : Module(Me) { + Implementation eventlist[] = { I_OnSyncUserMetaData, I_OnPreCommand, I_OnUserList, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 4); } void Implements(char* List) diff --git a/src/modules/m_uninvite.cpp b/src/modules/m_uninvite.cpp index 0adc26cb7..c07c9817e 100644 --- a/src/modules/m_uninvite.cpp +++ b/src/modules/m_uninvite.cpp @@ -89,6 +89,7 @@ class ModuleUninvite : public Module mycommand = new CommandUninvite(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleUninvite() diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 4097ab510..d75bbb429 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -56,6 +56,8 @@ class ModuleUserIP : public Module mycommand = new CommandUserip(ServerInstance); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 1); } void Implements(char* List) diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 08d3e6b66..87f6292da 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -65,6 +65,7 @@ class ModuleVHost : public Module { mycommand = new CommandVhost(ServerInstance); ServerInstance->AddCommand(mycommand); + } virtual ~ModuleVHost() diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 84058d627..57799db51 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -312,6 +312,8 @@ class Modulewatch : public Module whos_watching_me = new watchentries(); mycommand = new CommandWatch(ServerInstance, maxwatch); ServerInstance->AddCommand(mycommand); + Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnCleanup, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric }; + ServerInstance->Modules->Attach(eventlist, this, 7); } virtual void OnRehash(User* user, const std::string ¶meter) diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp index 6d1e99d31..1fc9d337f 100644 --- a/src/modules/m_xmlsocket.cpp +++ b/src/modules/m_xmlsocket.cpp @@ -26,6 +26,8 @@ class ModuleXMLSocket : public Module : Module(Me) { OnRehash(NULL,""); + Implementation eventlist[] = { I_OnUnloadModule, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnRehash }; + ServerInstance->Modules->Attach(eventlist, this, 4); } virtual void OnRehash(User* user, const std::string ¶m) |