diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_sqlauth.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_sqllog.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sqloper.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_sqlutils.cpp | 7 |
4 files changed, 12 insertions, 5 deletions
diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index 59faf0c3d..be6e50e52 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -34,6 +34,10 @@ class ModuleSQLAuth : public Module public: ModuleSQLAuth() : sqlAuthed("sqlauth", this) { + } + + void init() + { SQLutils = ServerInstance->Modules->Find("m_sqlutils.so"); if (!SQLutils) throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqlauth.so."); diff --git a/src/modules/m_sqllog.cpp b/src/modules/m_sqllog.cpp index 30f0c6b10..5e14735ce 100644 --- a/src/modules/m_sqllog.cpp +++ b/src/modules/m_sqllog.cpp @@ -155,7 +155,7 @@ class ModuleSQLLog : public Module { public: - ModuleSQLLog() + void init() { Module* SQLutils = ServerInstance->Modules->Find("m_sqlutils.so"); if (!SQLutils) diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 871ef7d46..cca391cf5 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -32,6 +32,10 @@ class ModuleSQLOper : public Module public: ModuleSQLOper() : saved_user("sqloper_user", this), saved_pass("sqloper_pass", this) { + } + + void init() + { OnRehash(NULL); SQLutils = ServerInstance->Modules->Find("m_sqlutils.so"); diff --git a/src/modules/m_sqlutils.cpp b/src/modules/m_sqlutils.cpp index ebb69ca86..3071f5242 100644 --- a/src/modules/m_sqlutils.cpp +++ b/src/modules/m_sqlutils.cpp @@ -33,15 +33,14 @@ private: public: ModuleSQLutils() : idExt("sqlutils_list", this) { - Implementation eventlist[] = { I_OnChannelDelete, I_OnUnloadModule, I_OnUserDisconnect }; - ServerInstance->Modules->Attach(eventlist, this, 3); } - ~ModuleSQLutils() + void init() { + Implementation eventlist[] = { I_OnChannelDelete, I_OnUnloadModule, I_OnUserDisconnect }; + ServerInstance->Modules->Attach(eventlist, this, 3); } - void OnRequest(Request& request) { if(strcmp(SQLUTILAU, request.id) == 0) |