diff options
Diffstat (limited to 'src/modules')
127 files changed, 0 insertions, 499 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index fffadcd32..50df9fc26 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -57,8 +57,6 @@ class ModuleGeoIP : public Module throw ModuleException("Unable to initialize geoip, are you missing GeoIP.dat?"); ServerInstance->Modules->AddService(ext); - Implementation eventlist[] = { I_OnSetConnectClass, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); for (LocalUserList::const_iterator i = ServerInstance->Users->local_users.begin(); i != ServerInstance->Users->local_users.end(); ++i) { diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp index 250fce8c1..517a6d395 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -122,8 +122,6 @@ public: { ServerInstance->Modules->AddService(ldapAuthed); ServerInstance->Modules->AddService(ldapVhost); - Implementation eventlist[] = { I_OnCheckReady, I_OnRehash,I_OnUserRegister, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/extra/m_ldapoper.cpp b/src/modules/extra/m_ldapoper.cpp index 68e4cbf9f..af7b48d07 100644 --- a/src/modules/extra/m_ldapoper.cpp +++ b/src/modules/extra/m_ldapoper.cpp @@ -99,8 +99,6 @@ public: void init() CXX11_OVERRIDE { - Implementation eventlist[] = { I_OnRehash, I_OnPreCommand }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/extra/m_mssql.cpp b/src/modules/extra/m_mssql.cpp index 5e50f1325..38bf60e40 100644 --- a/src/modules/extra/m_mssql.cpp +++ b/src/modules/extra/m_mssql.cpp @@ -658,8 +658,6 @@ class ModuleMsSQL : public Module ServerInstance->Threads->Start(queryDispatcher); - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->Modules->AddService(sqlserv); } diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 529682bb8..2d20a82ab 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -382,9 +382,6 @@ void ModuleSQL::init() Dispatcher = new DispatcherThread(this); ServerInstance->Threads->Start(Dispatcher); - Implementation eventlist[] = { I_OnRehash, I_OnUnloadModule }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - OnRehash(NULL); } diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index f8889ed63..2300c9d5b 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -511,9 +511,6 @@ class ModulePgSQL : public Module void init() CXX11_OVERRIDE { ReadConf(); - - Implementation eventlist[] = { I_OnUnloadModule, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModulePgSQL() diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp index 064edb5f6..3a35ce43b 100644 --- a/src/modules/extra/m_regex_posix.cpp +++ b/src/modules/extra/m_regex_posix.cpp @@ -95,8 +95,6 @@ class ModuleRegexPOSIX : public Module ModuleRegexPOSIX() : ref(this) { ServerInstance->Modules->AddService(ref); - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/extra/m_regex_stdlib.cpp b/src/modules/extra/m_regex_stdlib.cpp index 5d2294c87..8a4a8cd23 100644 --- a/src/modules/extra/m_regex_stdlib.cpp +++ b/src/modules/extra/m_regex_stdlib.cpp @@ -72,8 +72,6 @@ public: ModuleRegexStd() : ref(this) { ServerInstance->Modules->AddService(ref); - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 945584df2..71ba6e613 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -206,9 +206,6 @@ class ModuleSQLite3 : public Module void init() CXX11_OVERRIDE { ReadConf(); - - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleSQLite3() diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 68e12e208..a3502a57b 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -626,9 +626,6 @@ class ModuleSSLGnuTLS : public Module // Void return, guess we assume success gnutls_certificate_set_dh_params(iohook.x509_cred, dh_params); - Implementation eventlist[] = { I_On005Numeric, I_OnRehash, I_OnModuleRehash, I_OnUserConnect, - I_OnEvent, I_OnHookIO }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->Modules->AddService(iohook); ServerInstance->Modules->AddService(starttls); diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index a0043b7aa..29f574fd0 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -494,8 +494,6 @@ class ModuleSSLOpenSSL : public Module { // Needs the flag as it ignores a plain /rehash OnModuleRehash(NULL,"ssl"); - Implementation eventlist[] = { I_On005Numeric, I_OnRehash, I_OnModuleRehash, I_OnHookIO, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->Modules->AddService(iohook); } diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp index 7d094d7a2..32878614d 100644 --- a/src/modules/m_abbreviation.cpp +++ b/src/modules/m_abbreviation.cpp @@ -22,11 +22,6 @@ class ModuleAbbreviation : public Module { public: - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->Attach(I_OnPreCommand, this); - } - void Prioritize() { ServerInstance->Modules->SetPriority(this, I_OnPreCommand, PRIORITY_FIRST); diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 73e3bfd46..4d942854c 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -105,8 +105,6 @@ class ModuleAlias : public Module void init() CXX11_OVERRIDE { ReadAliases(); - Implementation eventlist[] = { I_OnPreCommand, I_OnRehash, I_OnUserMessage }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp index 1130dd223..a33bee832 100644 --- a/src/modules/m_allowinvite.cpp +++ b/src/modules/m_allowinvite.cpp @@ -37,8 +37,6 @@ class ModuleAllowInvite : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(ni); - Implementation eventlist[] = { I_OnUserPreInvite, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index ae2134cc1..af828c130 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -56,12 +56,6 @@ class ModuleAuditorium : public Module ServerInstance->Modules->AddService(aum); OnRehash(NULL); - - Implementation eventlist[] = { - I_OnUserJoin, I_OnUserPart, I_OnUserKick, - I_OnBuildNeighborList, I_OnNamesListItem, I_OnSendWhoLine, - I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index df90f70c9..6bc5f464c 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -89,9 +89,6 @@ class ModuleAutoOp : public Module { ServerInstance->Modules->AddService(mh); mh.DoImplements(this); - - Implementation list[] = { I_OnPostJoin, }; - ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation)); } void OnPostJoin(Membership *memb) CXX11_OVERRIDE diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 2eb5083f9..e142af0de 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -56,8 +56,6 @@ class ModuleBanException : public Module ServerInstance->Modules->AddService(be); be.DoImplements(this); - Implementation list[] = { I_OnRehash, I_On005Numeric, I_OnExtBanCheck, I_OnCheckChannelBan }; - ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index 446d575df..73d8270d1 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -233,8 +233,6 @@ class ModuleBanRedirect : public Module { ServerInstance->Modes->AddModeWatcher(&re); ServerInstance->Modules->AddService(re.extItem); - Implementation list[] = { I_OnUserPreJoin }; - ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation)); } void OnCleanup(int target_type, void* item) CXX11_OVERRIDE diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index 3521bd89d..b71247d71 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -61,8 +61,6 @@ class ModuleBlockAmsg : public Module { this->OnRehash(NULL); ServerInstance->Modules->AddService(blockamsg); - Implementation eventlist[] = { I_OnRehash, I_OnPreCommand }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 0eab38588..8e7d76f4a 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -47,8 +47,6 @@ public: { OnRehash(NULL); ServerInstance->Modules->AddService(bc); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnRehash, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index e2fa2e3d6..6e04e53da 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -43,8 +43,6 @@ class ModuleBlockColor : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(bc); - Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 4a4ea68d0..7c2794789 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -41,8 +41,6 @@ class ModuleBotMode : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(bm); - Implementation eventlist[] = { I_OnWhois }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index 5a18730af..3d2394fb1 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -368,9 +368,6 @@ public: ServerInstance->Modules->AddService(myumode); ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.extInfo); - - Implementation eventlist[] = { I_OnRehash, I_OnUserPostNick, I_OnUserQuit, I_On005Numeric, I_OnUserPreMessage }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index fa7a3d30c..35c24fd23 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -129,9 +129,6 @@ class ModuleCAP : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.reghold); - - Implementation eventlist[] = { I_OnCheckReady }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnCheckReady(LocalUser* user) CXX11_OVERRIDE diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index d66a15f37..39a5d6266 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -159,8 +159,6 @@ class ModuleCBan : public Module ServerInstance->XLines->RegisterFactory(&f); ServerInstance->Modules->AddService(mycommand); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleCBan() diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index 148c460de..747c16d83 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -60,8 +60,6 @@ class ModuleCensor : public Module OnRehash(NULL); ServerInstance->Modules->AddService(cu); ServerInstance->Modules->AddService(cc); - Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } // format of a config entry is <badword text="shit" replace="poo"> diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index cac143f39..65671632d 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -239,9 +239,6 @@ public: OnRehash(NULL); ServiceProvider* providerlist[] = { &cmd, &cmd.realhost, &cmd.realip, &cmd.webirc_hostname, &cmd.webirc_ip, &waiting }; ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*)); - - Implementation eventlist[] = { I_OnRehash, I_OnUserRegister, I_OnCheckReady }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_chancreate.cpp b/src/modules/m_chancreate.cpp index 35b1a98db..6cf4af235 100644 --- a/src/modules/m_chancreate.cpp +++ b/src/modules/m_chancreate.cpp @@ -27,8 +27,6 @@ class ModuleChanCreate : public Module void init() CXX11_OVERRIDE { ServerInstance->SNO->EnableSnomask('j', "CHANCREATE"); - Implementation eventlist[] = { I_OnUserJoin }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_chanfilter.cpp b/src/modules/m_chanfilter.cpp index fdc45a97e..38ee14e60 100644 --- a/src/modules/m_chanfilter.cpp +++ b/src/modules/m_chanfilter.cpp @@ -80,8 +80,6 @@ class ModuleChanFilter : public Module ServerInstance->Modules->AddService(cf); cf.DoImplements(this); - Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnSyncChannel }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index 464195e39..bace497c2 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -117,8 +117,6 @@ class ModuleChanHistory : public Module ServerInstance->Modules->AddService(m); ServerInstance->Modules->AddService(m.ext); - Implementation eventlist[] = { I_OnPostJoin, I_OnUserMessage, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_chanlog.cpp b/src/modules/m_chanlog.cpp index fb7f5f1c0..a62fbf9b2 100644 --- a/src/modules/m_chanlog.cpp +++ b/src/modules/m_chanlog.cpp @@ -31,9 +31,6 @@ class ModuleChanLog : public Module public: void init() CXX11_OVERRIDE { - Implementation eventlist[] = { I_OnRehash, I_OnSendSnotice }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - OnRehash(NULL); } diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index aed3ec226..4228d5050 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -62,8 +62,6 @@ class ModuleChannelNames : public Module void init() CXX11_OVERRIDE { ServerInstance->IsChannel = &myhandler; - Implementation eventlist[] = { I_OnRehash, I_OnUserKick }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index 50df8a782..3260c0fa4 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -23,12 +23,6 @@ class ModuleBadChannelExtban : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Extban 'j' - channel status/join ban", VF_OPTCOMMON|VF_VENDOR); diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index e0944b46b..4fcb5ce80 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -98,8 +98,6 @@ class ModuleChgHost : public Module { OnRehash(NULL); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index b258a1fe1..4e203d14c 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -153,9 +153,6 @@ class ModuleCloaking : public Module ServerInstance->Modules->AddService(cu); ServerInstance->Modules->AddService(ck); ServerInstance->Modules->AddService(cu.ext); - - Implementation eventlist[] = { I_OnRehash, I_OnCheckBan, I_OnUserConnect, I_OnChangeHost }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } /** This function takes a domain name string and returns just the last two domain parts, diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 02125c2ae..5871f5f9d 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -38,7 +38,6 @@ class ModulePrivacyMode : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(pm); - ServerInstance->Modules->Attach(I_OnUserPreMessage, this); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index 182b77b99..fdcf82dcc 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -25,12 +25,6 @@ class ModuleConnJoin : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnPostConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - void Prioritize() { ServerInstance->Modules->SetPriority(this, I_OnPostConnect, PRIORITY_LAST); diff --git a/src/modules/m_conn_umodes.cpp b/src/modules/m_conn_umodes.cpp index 47f0fc1bc..bae9317d5 100644 --- a/src/modules/m_conn_umodes.cpp +++ b/src/modules/m_conn_umodes.cpp @@ -25,11 +25,6 @@ class ModuleModesOnConnect : public Module { public: - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->Attach(I_OnUserConnect, this); - } - void Prioritize() { // for things like +x on connect, important, otherwise we have to resort to config order (bleh) -- w00t diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index 677510e8f..c15205df3 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -40,8 +40,6 @@ class ModuleWaitPong : public Module { ServerInstance->Modules->AddService(ext); OnRehash(NULL); - Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp index ca32aa64f..c730602a1 100644 --- a/src/modules/m_connectban.cpp +++ b/src/modules/m_connectban.cpp @@ -31,8 +31,6 @@ class ModuleConnectBan : public Module public: void init() CXX11_OVERRIDE { - Implementation eventlist[] = { I_OnSetUserIP, I_OnGarbageCollect, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_connflood.cpp b/src/modules/m_connflood.cpp index 589e1226d..23b570bf6 100644 --- a/src/modules/m_connflood.cpp +++ b/src/modules/m_connflood.cpp @@ -39,8 +39,6 @@ public: void init() CXX11_OVERRIDE { InitConf(); - Implementation eventlist[] = { I_OnRehash, I_OnUserRegister }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 86ed66110..5a3a925a3 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -83,7 +83,6 @@ class ModuleCustomTitle : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.ctitle); - ServerInstance->Modules->Attach(I_OnWhoisLine, this); } // :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games. diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 95a03ef0d..d65537537 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -259,8 +259,6 @@ class ModuleDCCAllow : public Module ServerInstance->Modules->AddService(*ext); ServerInstance->Modules->AddService(cmd); ReadFileConf(); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserQuit, I_OnUserPostNick, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index dfc37b72b..2e07aea41 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -58,8 +58,6 @@ class ModuleDeaf : public Module ServerInstance->Modules->AddService(m1); OnRehash(NULL); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 525388a42..444cbbc39 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -48,8 +48,6 @@ class ModuleDelayJoin : public Module { ServerInstance->Modules->AddService(djm); ServerInstance->Modules->AddService(unjoined); - Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnBuildNeighborList, I_OnNamesListItem, I_OnText, I_OnRawMode }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE; void OnNamesListItem(User* issuer, Membership*, std::string &prefixes, std::string &nick) CXX11_OVERRIDE; diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index cc22a3926..1e16647f3 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -49,8 +49,6 @@ class ModuleDelayMsg : public Module { ServerInstance->Modules->AddService(djm); ServerInstance->Modules->AddService(djm.jointime); - Implementation eventlist[] = { I_OnUserJoin, I_OnUserPreMessage}; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE; void OnUserJoin(Membership* memb, bool sync, bool created, CUList&) CXX11_OVERRIDE; diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index 60af0e391..237447ac7 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -32,12 +32,6 @@ class ModuleDenyChannels : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - void OnRehash(User* user) CXX11_OVERRIDE { /* check for redirect validity and loops/chains */ diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index e05dab367..d6433f142 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -234,8 +234,6 @@ class ModuleDNSBL : public Module ReadConf(); ServerInstance->Modules->AddService(nameExt); ServerInstance->Modules->AddService(countExt); - Implementation eventlist[] = { I_OnRehash, I_OnSetUserIP, I_OnStats, I_OnSetConnectClass, I_OnCheckReady }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleDNSBL() diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index e3f819117..a74658bcd 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -116,8 +116,6 @@ class ModuleExemptChanOps : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(eh.ec); - Implementation eventlist[] = { I_OnRehash, I_OnSyncChannel }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->OnCheckExemption = &eh; OnRehash(NULL); diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index e4d4a71aa..30ee35f88 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -301,8 +301,6 @@ ModuleFilter::ModuleFilter() void ModuleFilter::init() { ServerInstance->Modules->AddService(filtcommand); - Implementation eventlist[] = { I_OnPreCommand, I_OnStats, I_OnSyncNetwork, I_OnDecodeMetaData, I_OnUserPreMessage, I_OnRehash, I_OnUnloadModule }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_gecosban.cpp b/src/modules/m_gecosban.cpp index 49dd117a1..a15f19418 100644 --- a/src/modules/m_gecosban.cpp +++ b/src/modules/m_gecosban.cpp @@ -22,12 +22,6 @@ class ModuleGecosBan : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Extban 'r' - realname (gecos) ban", VF_OPTCOMMON|VF_VENDOR); diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index a2fead630..7d7e9663a 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -111,8 +111,6 @@ class ModuleHelpop : public Module ReadConfig(); ServerInstance->Modules->AddService(ho); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnRehash, I_OnWhois }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void ReadConfig() diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp index bfc0c519a..1bf87bd14 100644 --- a/src/modules/m_hidechans.cpp +++ b/src/modules/m_hidechans.cpp @@ -40,8 +40,6 @@ class ModuleHideChans : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(hm); - Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 3ea653a75..ded6f6791 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -44,8 +44,6 @@ class ModuleHideOper : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(hm); - Implementation eventlist[] = { I_OnWhoisLine, I_OnSendWhoLine }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index ac53e793c..74c58b22a 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -54,8 +54,6 @@ class ModuleHostChange : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnRehash, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index bb5d5c0b0..e6ed69380 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -360,7 +360,6 @@ class ModuleHttpServer : public Module { HttpModule = this; ServerInstance->Modules->AddService(APIImpl); - ServerInstance->Modules->Attach(I_OnAcceptConnection, this); } ModResult OnAcceptConnection(int nfd, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server) CXX11_OVERRIDE diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index 4163daf2a..272316440 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -96,8 +96,6 @@ class ModuleHTTPAccessList : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnEvent, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void BlockAccess(HTTPRequest* http, int returnval, const std::string &extraheaderkey = "", const std::string &extraheaderval="") diff --git a/src/modules/m_httpd_config.cpp b/src/modules/m_httpd_config.cpp index d495cfb59..8333d9f9c 100644 --- a/src/modules/m_httpd_config.cpp +++ b/src/modules/m_httpd_config.cpp @@ -32,12 +32,6 @@ class ModuleHttpConfig : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnEvent }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - std::string Sanitize(const std::string &str) { std::string ret; diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 3f8fa1b4a..df98ef3f5 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -37,12 +37,6 @@ class ModuleHttpStats : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnEvent }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - std::string Sanitize(const std::string &str) { std::string ret; diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index a2754055f..12a71144f 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -280,11 +280,6 @@ class ModuleIdent : public Module { ServerInstance->Modules->AddService(ext); OnRehash(NULL); - Implementation eventlist[] = { - I_OnRehash, I_OnUserInit, I_OnCheckReady, - I_OnUserDisconnect, I_OnSetConnectClass - }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 9eaa5be73..700df27fb 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -57,8 +57,6 @@ public: OnRehash(NULL); ie.DoImplements(this); - Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index 643e6a7b3..59a69f669 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -79,8 +79,6 @@ class ModuleIRCv3 : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnUserJoin, I_OnPostJoin, I_OnSetAway, I_OnEvent, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 39ba3f9a0..efb277f81 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -149,8 +149,6 @@ class ModuleJoinFlood : public Module { ServerInstance->Modules->AddService(jf); ServerInstance->Modules->AddService(jf.ext); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserJoin }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp index 50aa26c91..e6c8e4e13 100644 --- a/src/modules/m_jumpserver.cpp +++ b/src/modules/m_jumpserver.cpp @@ -139,8 +139,6 @@ class ModuleJumpServer : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(js); - Implementation eventlist[] = { I_OnUserRegister, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserRegister(LocalUser* user) CXX11_OVERRIDE diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index cefba1b1a..bb04610de 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -80,8 +80,6 @@ public: { ServerInstance->Modules->AddService(kr); ServerInstance->Modules->AddService(kr.ext); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserKick }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 3aa49094e..96ea66d7b 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -100,7 +100,6 @@ class ModuleKnock : public Module ServerInstance->Modules->AddService(kn); ServerInstance->Modules->AddService(cmd); - ServerInstance->Modules->Attach(I_OnRehash, this); OnRehash(NULL); } diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index 74b4b214c..8fae86e1e 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -91,8 +91,6 @@ class ModuleLockserv : public Module locked = false; ServerInstance->Modules->AddService(lockcommand); ServerInstance->Modules->AddService(unlockcommand); - Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_maphide.cpp b/src/modules/m_maphide.cpp index ee6f7528d..21072c1fc 100644 --- a/src/modules/m_maphide.cpp +++ b/src/modules/m_maphide.cpp @@ -25,8 +25,6 @@ class ModuleMapHide : public Module public: void init() CXX11_OVERRIDE { - Implementation eventlist[] = { I_OnPreCommand, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 776841bcc..ef7bf9d52 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -128,7 +128,6 @@ class ModuleMsgFlood : public Module { ServerInstance->Modules->AddService(mf); ServerInstance->Modules->AddService(mf.ext); - ServerInstance->Modules->Attach(I_OnUserPreMessage, this); } ModResult ProcessMessages(User* user,Channel* dest, const std::string &text) diff --git a/src/modules/m_mlock.cpp b/src/modules/m_mlock.cpp index 8ad062aea..abcd79667 100644 --- a/src/modules/m_mlock.cpp +++ b/src/modules/m_mlock.cpp @@ -28,7 +28,6 @@ public: void init() CXX11_OVERRIDE { - ServerInstance->Modules->Attach(I_OnPreMode, this); ServerInstance->Modules->AddService(this->mlock); } diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp index 00c44a639..06ede1f54 100644 --- a/src/modules/m_muteban.cpp +++ b/src/modules/m_muteban.cpp @@ -23,12 +23,6 @@ class ModuleQuietBan : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Implements extban +b m: - mute bans",VF_OPTCOMMON|VF_VENDOR); diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index d53b71b67..8647cebb4 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -107,9 +107,6 @@ class ModuleNamedModes : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(dummyZ); - - Implementation eventlist[] = { I_OnPreMode }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp index 60289c29c..afbf7a8e2 100644 --- a/src/modules/m_namesx.cpp +++ b/src/modules/m_namesx.cpp @@ -31,12 +31,6 @@ class ModuleNamesX : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnPreCommand, I_OnNamesListItem, I_On005Numeric, I_OnEvent, I_OnSendWhoLine }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides the NAMESX (CAP multi-prefix) capability.",VF_VENDOR); diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 927a5a4da..10347ac67 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -240,8 +240,6 @@ class ModuleNationalChars : public Module ServerInstance->IsNick = &myhandler; - Implementation eventlist[] = { I_OnRehash, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_nickflood.cpp b/src/modules/m_nickflood.cpp index 742f71d02..66e7ca520 100644 --- a/src/modules/m_nickflood.cpp +++ b/src/modules/m_nickflood.cpp @@ -140,8 +140,6 @@ class ModuleNickFlood : public Module { ServerInstance->Modules->AddService(nf); ServerInstance->Modules->AddService(nf.ext); - Implementation eventlist[] = { I_OnUserPreNick, I_OnUserPostNick }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index 0d820625d..6c4101bc5 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -153,7 +153,6 @@ class ModuleNickLock : public Module ServerInstance->Modules->AddService(cmd1); ServerInstance->Modules->AddService(cmd2); ServerInstance->Modules->AddService(locked); - ServerInstance->Modules->Attach(I_OnUserPreNick, this); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 94afe8bbb..d791dca36 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -40,8 +40,6 @@ class ModuleNoCTCP : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(nc); - Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index 8cea94196..5e58f002c 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -41,8 +41,6 @@ class ModuleNoKicks : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(nk); - Implementation eventlist[] = { I_OnUserPreKick, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index 1d5e7d785..4078e54a4 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -40,8 +40,6 @@ class ModuleNoNickChange : public Module { OnRehash(NULL); ServerInstance->Modules->AddService(nn); - Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 1fdbdde2a..cf8da5f55 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -40,8 +40,6 @@ class ModuleNoNotice : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(nt); - Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index 6d0f0a1c7..7aeb66920 100644 --- a/src/modules/m_nopartmsg.cpp +++ b/src/modules/m_nopartmsg.cpp @@ -22,12 +22,6 @@ class ModulePartMsgBan : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnUserPart, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Implements extban +b p: - part message bans", VF_OPTCOMMON|VF_VENDOR); diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp index 042b2aaba..8f7fe4460 100644 --- a/src/modules/m_ojoin.cpp +++ b/src/modules/m_ojoin.cpp @@ -142,9 +142,6 @@ class ModuleOjoin : public Module ServerInstance->Modules->AddService(*np); ServerInstance->Modules->AddService(mycommand); - - Implementation eventlist[] = { I_OnUserPreJoin, I_OnUserPreKick, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 62c8b0d5d..73ef130b9 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -43,8 +43,6 @@ class ModuleOperChans : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(oc); - Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric, I_OnUserPreJoin }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp index e421958b3..80bb73ad4 100644 --- a/src/modules/m_operjoin.cpp +++ b/src/modules/m_operjoin.cpp @@ -53,8 +53,6 @@ class ModuleOperjoin : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnPostOper, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp index 54cd07008..cacedd62d 100644 --- a/src/modules/m_operlevels.cpp +++ b/src/modules/m_operlevels.cpp @@ -25,11 +25,6 @@ class ModuleOperLevels : public Module { public: - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->Attach(I_OnKill, this); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Gives each oper type a 'level', cannot kill opers 'above' your level.", VF_VENDOR); diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index cf816897b..42a0e4ecf 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -28,8 +28,6 @@ class ModuleOperLog : public Module public: void init() CXX11_OVERRIDE { - Implementation eventlist[] = { I_OnPreCommand, I_On005Numeric, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->SNO->EnableSnomask('r', "OPERLOG"); OnRehash(NULL); } diff --git a/src/modules/m_opermodes.cpp b/src/modules/m_opermodes.cpp index ee726222d..7ab54cedf 100644 --- a/src/modules/m_opermodes.cpp +++ b/src/modules/m_opermodes.cpp @@ -25,11 +25,6 @@ class ModuleModesOnOper : public Module { public: - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->Attach(I_OnPostOper, this); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Sets (and unsets) modes on opers when they oper up", VF_VENDOR); diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp index 6abf16b78..1be81e641 100644 --- a/src/modules/m_opermotd.cpp +++ b/src/modules/m_opermotd.cpp @@ -84,8 +84,6 @@ class ModuleOpermotd : public Module { ServerInstance->Modules->AddService(cmd); OnRehash(NULL); - Implementation eventlist[] = { I_OnRehash, I_OnOper }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp index 643f09db9..43346a4d0 100644 --- a/src/modules/m_operprefix.cpp +++ b/src/modules/m_operprefix.cpp @@ -81,9 +81,6 @@ class ModuleOperPrefixMode : public Module { ServerInstance->Modules->AddService(opm); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnPostOper }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - /* To give clients a chance to learn about the new prefix we don't give +y to opers * right now. That means if the module was loaded after opers have joined channels * they need to rejoin them in order to get the oper prefix. diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index b29c1c676..e342e7dab 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -49,8 +49,6 @@ class ModuleOverride : public Module // read our config options (main config file) OnRehash(NULL); ServerInstance->SNO->EnableSnomask('v', "OVERRIDE"); - Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_passforward.cpp b/src/modules/m_passforward.cpp index 606f62c64..7f3cb6421 100644 --- a/src/modules/m_passforward.cpp +++ b/src/modules/m_passforward.cpp @@ -27,8 +27,6 @@ class ModulePassForward : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnPostConnect, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_password_hash.cpp b/src/modules/m_password_hash.cpp index 03b69e85d..4f7d9e449 100644 --- a/src/modules/m_password_hash.cpp +++ b/src/modules/m_password_hash.cpp @@ -86,8 +86,6 @@ class ModuleOperHash : public Module OnRehash(NULL); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnPassCompare }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnPassCompare(Extensible* ex, const std::string &data, const std::string &input, const std::string &hashtype) CXX11_OVERRIDE diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 36dff7a40..b8e5ea5e8 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -124,8 +124,6 @@ public: void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(p); - Implementation eventlist[] = { I_OnChannelPreDelete, I_OnPostTopicChange, I_OnRawMode, I_OnRehash, I_OnBackgroundTimer }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp index c9ffd42a9..1bb28583e 100644 --- a/src/modules/m_randquote.cpp +++ b/src/modules/m_randquote.cpp @@ -38,9 +38,6 @@ class ModuleRandQuote : public Module suffix = conf->getString("suffix"); FileReader reader(conf->getString("file", "quotes")); quotes = reader.GetVector(); - - Implementation eventlist[] = { I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnUserConnect(LocalUser* user) CXX11_OVERRIDE diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index 735b27ada..89097ade4 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -123,9 +123,6 @@ class ModuleRedirect : public Module /* Try to add the usermode */ ServerInstance->Modules->AddService(re_u); } - - Implementation eventlist[] = { I_OnUserPreJoin }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_regonlycreate.cpp b/src/modules/m_regonlycreate.cpp index 6b6e059df..b6f7c2c4f 100644 --- a/src/modules/m_regonlycreate.cpp +++ b/src/modules/m_regonlycreate.cpp @@ -33,12 +33,6 @@ class ModuleRegOnlyCreate : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnUserPreJoin }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE { if (chan) diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 19b774f04..43f7065b5 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -207,8 +207,6 @@ class ModuleRemove : public Module ServerInstance->Modules->AddService(cmd1); ServerInstance->Modules->AddService(cmd2); OnRehash(NULL); - Implementation eventlist[] = { I_On005Numeric, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 3f0afc571..4591d8ad2 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -352,8 +352,6 @@ class RepeatModule : public Module ServerInstance->Modules->AddService(rm); ServerInstance->Modules->AddService(rm.ChanSet); ServerInstance->Modules->AddService(rm.MemberInfoExt); - Implementation eventlist[] = { I_OnUserPreMessage, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); rm.ReadConfig(); } diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp index 9de6b1a0c..21686add3 100644 --- a/src/modules/m_restrictchans.cpp +++ b/src/modules/m_restrictchans.cpp @@ -42,8 +42,6 @@ class ModuleRestrictChans : public Module void init() CXX11_OVERRIDE { ReadConfig(); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index bab631b8e..5fae46d83 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -24,11 +24,6 @@ class ModuleRestrictMsg : public Module { public: - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->Attach(I_OnUserPreMessage, this); - } - ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string& text, char status, CUList& exempt_list, MessageType msgtype) CXX11_OVERRIDE { if ((target_type == TYPE_USER) && (IS_LOCAL(user))) diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index 20366e4e7..7a65947d3 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -227,9 +227,6 @@ class ModuleRLine : public Module ServerInstance->Modules->AddService(r); ServerInstance->XLines->RegisterFactory(&f); - - Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnUserPostNick, I_OnStats, I_OnBackgroundTimer, I_OnUnloadModule }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleRLine() diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index b17c8795b..cd0417aba 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -64,7 +64,6 @@ class ModuleSaMode : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(cmd); - ServerInstance->Modules->Attach(I_OnPreMode, this); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 3f9873415..8b6d4ed85 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -257,8 +257,6 @@ class ModuleSASL : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnEvent, I_OnUserRegister, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServiceProvider* providelist[] = { &auth, &sasl, &authExt }; ServerInstance->Modules->AddServices(providelist, 3); diff --git a/src/modules/m_securelist.cpp b/src/modules/m_securelist.cpp index 434261021..cfafd4f05 100644 --- a/src/modules/m_securelist.cpp +++ b/src/modules/m_securelist.cpp @@ -30,8 +30,6 @@ class ModuleSecureList : public Module void init() CXX11_OVERRIDE { OnRehash(NULL); - Implementation eventlist[] = { I_OnRehash, I_OnPreCommand, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_seenicks.cpp b/src/modules/m_seenicks.cpp index 7eefebf4b..bff3516f1 100644 --- a/src/modules/m_seenicks.cpp +++ b/src/modules/m_seenicks.cpp @@ -27,8 +27,6 @@ class ModuleSeeNicks : public Module void init() CXX11_OVERRIDE { ServerInstance->SNO->EnableSnomask('n',"NICK"); - Implementation eventlist[] = { I_OnUserPostNick }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp index 070d9d6f2..87fe08670 100644 --- a/src/modules/m_serverban.cpp +++ b/src/modules/m_serverban.cpp @@ -22,12 +22,6 @@ class ModuleServerBan : public Module { public: - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnCheckBan, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Extban 's' - server ban",VF_OPTCOMMON|VF_VENDOR); diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 077f04ab8..4f2125a97 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -120,10 +120,6 @@ class ModuleServicesAccount : public Module { ServiceProvider* providerlist[] = { &m1, &m2, &m3, &m4, &m5, &accountname }; ServerInstance->Modules->AddServices(providerlist, sizeof(providerlist)/sizeof(ServiceProvider*)); - Implementation eventlist[] = { I_OnWhois, I_OnUserPreMessage, I_OnUserPreJoin, I_OnCheckBan, - I_OnDecodeMetaData, I_On005Numeric, I_OnUserPostNick, I_OnSetConnectClass }; - - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp index 5edec41e8..2b550408c 100644 --- a/src/modules/m_servprotect.cpp +++ b/src/modules/m_servprotect.cpp @@ -54,8 +54,6 @@ class ModuleServProtectMode : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(bm); - Implementation eventlist[] = { I_OnWhois, I_OnKill, I_OnWhoisLine, I_OnRawMode, I_OnUserPreKick }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 87092f42f..636f2ff6b 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -78,8 +78,6 @@ class ModuleSetHost : public Module { OnRehash(NULL); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 5291ae595..bf3028c12 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -87,8 +87,6 @@ class ModuleShowwhois : public Module sw = new SeeWhois(this, OpersOnly); ServerInstance->Modules->AddService(*sw); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnWhois }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ~ModuleShowwhois() diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index d3baffefb..dbc1812c7 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -182,8 +182,6 @@ class ModuleShun : public Module ServerInstance->XLines->RegisterFactory(&f); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnStats, I_OnPreCommand, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); OnRehash(NULL); } diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index 1169d0d54..b6cb897e7 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -305,9 +305,6 @@ class ModuleSilence : public Module ServerInstance->Modules->AddService(cmdsilence); ServerInstance->Modules->AddService(cmdsvssilence); ServerInstance->Modules->AddService(cmdsilence.ext); - - Implementation eventlist[] = { I_OnRehash, I_On005Numeric, I_OnUserPreMessage, I_OnUserPreInvite }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 3c82d9de0..59e17f88e 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -71,17 +71,6 @@ void ModuleSpanningTree::init() ServerInstance->Modules->AddService(commands->fident); ServerInstance->Modules->AddService(commands->fname); - Implementation eventlist[] = - { - I_OnPreCommand, I_OnGetServerDescription, I_OnUserInvite, I_OnPostTopicChange, - I_OnUserMessage, I_OnBackgroundTimer, I_OnUserJoin, - I_OnChangeHost, I_OnChangeName, I_OnChangeIdent, I_OnUserPart, I_OnUnloadModule, - I_OnUserQuit, I_OnUserPostNick, I_OnUserKick, I_OnRehash, I_OnPreRehash, - I_OnOper, I_OnAddLine, I_OnDelLine, I_OnLoadModule, I_OnStats, - I_OnSetAway, I_OnPostCommand, I_OnUserConnect, I_OnAcceptConnection - }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - delete ServerInstance->PI; ServerInstance->PI = new SpanningTreeProtocolInterface(Utils); loopCall = false; diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 94f2823c9..ba969e54d 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -85,8 +85,6 @@ class ModuleSQLAuth : public Module { ServerInstance->Modules->AddService(pendingExt); OnRehash(NULL); - Implementation eventlist[] = { I_OnCheckReady, I_OnRehash, I_OnUserRegister }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index b59225ee8..b9a883043 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -114,9 +114,6 @@ public: void init() CXX11_OVERRIDE { OnRehash(NULL); - - Implementation eventlist[] = { I_OnRehash, I_OnPreCommand }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 4576e4ef3..c6fb2165c 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -151,9 +151,6 @@ class ModuleSSLInfo : public Module ServerInstance->Modules->AddService(APIImpl); ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.CertExt); - - Implementation eventlist[] = { I_OnWhois, I_OnPreCommand, I_OnSetConnectClass, I_OnUserConnect, I_OnPostConnect }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } Version GetVersion() CXX11_OVERRIDE diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 1d29bb5e1..191ca10f1 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -94,8 +94,6 @@ class ModuleSSLModes : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(sslm); - Implementation eventlist[] = { I_OnUserPreJoin, I_OnCheckBan, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven) CXX11_OVERRIDE diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index ba66d17b5..b50c22297 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -52,8 +52,6 @@ class ModuleStripColor : public Module { ServerInstance->Modules->AddService(usc); ServerInstance->Modules->AddService(csc); - Implementation eventlist[] = { I_OnUserPreMessage, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index bdabd4b93..fc1eb5381 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -158,8 +158,6 @@ class ModuleSVSHold : public Module { ServerInstance->XLines->RegisterFactory(&s); ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnUserPreNick, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } ModResult OnStats(char symbol, User* user, string_list &out) CXX11_OVERRIDE diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 936a18ee4..c2659f6aa 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -92,8 +92,6 @@ class ModuleSWhois : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(cmd.swhois); - Implementation eventlist[] = { I_OnWhoisLine, I_OnPostOper }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } // :kenny.chatspike.net 320 Brain Azhrarn :is getting paid to play games. diff --git a/src/modules/m_testnet.cpp b/src/modules/m_testnet.cpp index 29cb7ed86..4e99abd32 100644 --- a/src/modules/m_testnet.cpp +++ b/src/modules/m_testnet.cpp @@ -19,157 +19,6 @@ #include "inspircd.h" -struct vtbase -{ - virtual void isok(const char* name, int impl, Module* basemod, std::vector<std::string>& allmods) = 0; - virtual ~vtbase() {} -}; - -template<typename T> struct vtable : public vtbase -{ - union u { - T function; - struct v { - size_t delta; - size_t vtoff; - } v; - } u; - vtable(T t) { - u.function = t; - } - /** member function pointer dereference from vtable; depends on the GCC 4.4 ABI (x86_64) */ - template<typename E> void* read(E* obj) - { - if (u.v.delta & 1) - { - uint8_t* optr = reinterpret_cast<uint8_t*>(obj); - optr += u.v.vtoff; - uint8_t* vptr = *reinterpret_cast<uint8_t**>(optr); - vptr += u.v.delta - 1; - return *reinterpret_cast<void**>(vptr); - } - else - return reinterpret_cast<void*>(u.v.delta); - } - void isok(const char* name, int impl, Module* basemod, std::vector<std::string>& allmods) - { - void* base = read(basemod); - for(unsigned int i=0; i < allmods.size(); ++i) - { - Module* mod = ServerInstance->Modules->Find(allmods[i]); - void* fptr = read(mod); - for(EventHandlerIter j = ServerInstance->Modules->EventHandlers[impl].begin(); - j != ServerInstance->Modules->EventHandlers[impl].end(); j++) - { - if (mod == *j) - { - if (fptr == base) - { - ServerInstance->SNO->WriteToSnoMask('a', "Module %s implements %s but uses default function", - mod->ModuleSourceFile.c_str(), name); - } - goto done; - } - } - if (fptr != base) - { - ServerInstance->SNO->WriteToSnoMask('a', "Module %s does not implement %s but overrides function", - mod->ModuleSourceFile.c_str(), name); - } - done:; - } - } -}; - -template<typename T> vtbase* vtinit(T t) -{ - return new vtable<T>(t); -} - -static void checkall(Module* noimpl) -{ - std::vector<std::string> allmods = ServerInstance->Modules->GetAllModuleNames(0); -#define CHK(name) do { \ - vtbase* vt = vtinit(&Module::name); \ - vt->isok(#name, I_ ## name, noimpl, allmods); \ - delete vt; \ -} while (0) - CHK(OnUserConnect); - CHK(OnUserQuit); - CHK(OnUserDisconnect); - CHK(OnUserJoin); - CHK(OnUserPart); - CHK(OnRehash); - CHK(OnSendSnotice); - CHK(OnUserPreJoin); - CHK(OnUserPreKick); - CHK(OnUserKick); - CHK(OnOper); - CHK(OnInfo); - CHK(OnWhois); - CHK(OnUserPreInvite); - CHK(OnUserInvite); - CHK(OnUserPreMessage); - CHK(OnUserPreNick); - CHK(OnUserMessage); - CHK(OnMode); - CHK(OnGetServerDescription); - CHK(OnSyncUser); - CHK(OnSyncChannel); - CHK(OnDecodeMetaData); - CHK(OnAcceptConnection); - CHK(OnChangeHost); - CHK(OnChangeName); - CHK(OnAddLine); - CHK(OnDelLine); - CHK(OnExpireLine); - CHK(OnUserPostNick); - CHK(OnPreMode); - CHK(On005Numeric); - CHK(OnKill); - CHK(OnLoadModule); - CHK(OnUnloadModule); - CHK(OnBackgroundTimer); - CHK(OnPreCommand); - CHK(OnCheckReady); - CHK(OnCheckInvite); - CHK(OnRawMode); - CHK(OnCheckKey); - CHK(OnCheckLimit); - CHK(OnCheckBan); - CHK(OnCheckChannelBan); - CHK(OnExtBanCheck); - CHK(OnStats); - CHK(OnChangeLocalUserHost); - CHK(OnPreTopicChange); - CHK(OnPostTopicChange); - CHK(OnEvent); - CHK(OnGlobalOper); - CHK(OnPostConnect); - CHK(OnChangeLocalUserGECOS); - CHK(OnUserRegister); - CHK(OnChannelPreDelete); - CHK(OnChannelDelete); - CHK(OnPostOper); - CHK(OnSyncNetwork); - CHK(OnSetAway); - CHK(OnPostCommand); - CHK(OnPostJoin); - CHK(OnWhoisLine); - CHK(OnBuildNeighborList); - CHK(OnGarbageCollect); - CHK(OnText); - CHK(OnPassCompare); - CHK(OnRunTestSuite); - CHK(OnNamesListItem); - CHK(OnNumeric); - CHK(OnHookIO); - CHK(OnPreRehash); - CHK(OnModuleRehash); - CHK(OnSendWhoLine); - CHK(OnChangeIdent); -} - class CommandTest : public Command { public: @@ -191,11 +40,6 @@ class CommandTest : public Command { IS_LOCAL(user)->CommandFloodPenalty += atoi(parameters[1].c_str()); } - else if (parameters[0] == "check") - { - checkall(creator); - ServerInstance->SNO->WriteToSnoMask('a', "Module check complete"); - } return CMD_SUCCESS; } }; diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 6a885a2fe..afb042da0 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -151,8 +151,6 @@ class ModuleTimedBans : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_OnBackgroundTimer }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->Modes->AddModeWatcher(&banwatcher); } diff --git a/src/modules/m_topiclock.cpp b/src/modules/m_topiclock.cpp index 4a10f0fe3..760283c95 100644 --- a/src/modules/m_topiclock.cpp +++ b/src/modules/m_topiclock.cpp @@ -153,7 +153,6 @@ class ModuleTopicLock : public Module { ServerInstance->Modules->AddService(cmd); ServerInstance->Modules->AddService(topiclock); - ServerInstance->Modules->Attach(I_OnPreTopicChange, this); } ModResult OnPreTopicChange(User* user, Channel* chan, const std::string &topic) CXX11_OVERRIDE diff --git a/src/modules/m_uhnames.cpp b/src/modules/m_uhnames.cpp index ba994404a..2534afb97 100644 --- a/src/modules/m_uhnames.cpp +++ b/src/modules/m_uhnames.cpp @@ -31,12 +31,6 @@ class ModuleUHNames : public Module { } - void init() CXX11_OVERRIDE - { - Implementation eventlist[] = { I_OnEvent, I_OnPreCommand, I_OnNamesListItem, I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides the UHNAMES facility.",VF_VENDOR); diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index b2206220d..97e4c9284 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -88,8 +88,6 @@ class ModuleUserIP : public Module void init() CXX11_OVERRIDE { ServerInstance->Modules->AddService(cmd); - Implementation eventlist[] = { I_On005Numeric }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void On005Numeric(std::map<std::string, std::string>& tokens) CXX11_OVERRIDE diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index c6b580277..94f53c164 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -380,8 +380,6 @@ class Modulewatch : public Module ServerInstance->Modules->AddService(cmdw); ServerInstance->Modules->AddService(sw); ServerInstance->Modules->AddService(cmdw.ext); - Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } void OnRehash(User* user) CXX11_OVERRIDE diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index 26c108609..df6f4c10c 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -41,8 +41,6 @@ class ModuleXLineDB : public Module // Read xlines before attaching to events ReadDatabase(); - Implementation eventlist[] = { I_OnAddLine, I_OnDelLine, I_OnExpireLine, I_OnBackgroundTimer }; - ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); dirty = false; } |