diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-12-02 19:40:00 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-12-02 19:40:00 +0100 |
commit | 84a1569cd60daa64b1ae52a1fff62c0dc4d78850 (patch) | |
tree | f4361e52c9f8c351dd787e0919f7e411ac1717df /src/modules/extra | |
parent | ac7defcd3e52695dcf5e5150e9fe3e1624205e64 (diff) |
Dynamically determine the size of the eventlist[] passed to Attach()
m_sqlauth was attached to I_OnUserDisconnect but didn't provide a handler for it, remove
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_geoip.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ldapauth.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_ldapoper.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_mssql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_regex_posix.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_regex_stdlib.cpp | 2 | ||||
-rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/extra/m_geoip.cpp b/src/modules/extra/m_geoip.cpp index f92054f9e..3dd74d8b0 100644 --- a/src/modules/extra/m_geoip.cpp +++ b/src/modules/extra/m_geoip.cpp @@ -58,7 +58,7 @@ class ModuleGeoIP : public Module ServerInstance->Modules->AddService(ext); Implementation eventlist[] = { I_OnSetConnectClass, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, 2); + 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 612fb79f6..5b3f1e7cc 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -124,7 +124,7 @@ public: ServerInstance->Modules->AddService(ldapAuthed); ServerInstance->Modules->AddService(ldapVhost); Implementation eventlist[] = { I_OnCheckReady, I_OnRehash,I_OnUserRegister, I_OnUserConnect }; - ServerInstance->Modules->Attach(eventlist, this, 4); + 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 e8455529d..1812a5ba4 100644 --- a/src/modules/extra/m_ldapoper.cpp +++ b/src/modules/extra/m_ldapoper.cpp @@ -49,7 +49,7 @@ public: { conn = NULL; Implementation eventlist[] = { I_OnRehash, I_OnPassCompare }; - ServerInstance->Modules->Attach(eventlist, this, 2); + 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 27410e95b..598f9aac9 100644 --- a/src/modules/extra/m_mssql.cpp +++ b/src/modules/extra/m_mssql.cpp @@ -664,7 +664,7 @@ class ModuleMsSQL : public Module ServerInstance->Threads->Start(queryDispatcher); Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 1); + 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 08ec93cf2..682f041ad 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -383,7 +383,7 @@ void ModuleSQL::init() ServerInstance->Threads->Start(Dispatcher); Implementation eventlist[] = { I_OnRehash, I_OnUnloadModule }; - ServerInstance->Modules->Attach(eventlist, this, 2); + 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 ab6908d17..7751f9b82 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -513,7 +513,7 @@ class ModulePgSQL : public Module ReadConf(); Implementation eventlist[] = { I_OnUnloadModule, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 2); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModulePgSQL() diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp index e3e436bd6..b3afd60c8 100644 --- a/src/modules/extra/m_regex_posix.cpp +++ b/src/modules/extra/m_regex_posix.cpp @@ -96,7 +96,7 @@ public: ModuleRegexPOSIX() : ref(this) { ServerInstance->Modules->AddService(ref); Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 1); + 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 4942e9739..204728b65 100644 --- a/src/modules/extra/m_regex_stdlib.cpp +++ b/src/modules/extra/m_regex_stdlib.cpp @@ -76,7 +76,7 @@ public: ModuleRegexStd() : ref(this) { ServerInstance->Modules->AddService(ref); Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 1); + 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 c10f62bd2..7f6a53359 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -219,7 +219,7 @@ class ModuleSQLite3 : public Module ReadConf(); Implementation eventlist[] = { I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, this, 1); + ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } virtual ~ModuleSQLite3() |