diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 15 | ||||
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 13 | ||||
-rw-r--r-- | src/modules/extra/m_sqlauth.cpp | 13 | ||||
-rw-r--r-- | src/modules/extra/m_sqllog.cpp | 13 | ||||
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 19 | ||||
-rw-r--r-- | src/modules/extra/m_sqlutils.cpp | 5 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 3 | ||||
-rw-r--r-- | src/modules/extra/m_testclient.cpp | 3 |
9 files changed, 39 insertions, 48 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 5d8eeef7d..a78e8c61b 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -713,7 +713,7 @@ class ModuleSQL : public Module ModuleSQL(InspIRCd* Me) : Module::Module(Me), rehashing(false) { - ServerInstance->UseInterface("SQLutils"); + ServerInstance->Modules->UseInterface("SQLutils"); Conf = new ConfigReader(ServerInstance); PublicServerInstance = ServerInstance; @@ -730,24 +730,24 @@ class ModuleSQL : public Module throw ModuleException("m_mysql: Failed to create dispatcher thread: " + std::string(strerror(errno))); } - if (!ServerInstance->PublishFeature("SQL", this)) + if (!ServerInstance->Modules->PublishFeature("SQL", this)) { /* Tell worker thread to exit NOW */ giveup = true; throw ModuleException("m_mysql: Unable to publish feature 'SQL'"); } - ServerInstance->PublishInterface("SQL", this); + ServerInstance->Modules->PublishInterface("SQL", this); } virtual ~ModuleSQL() { giveup = true; ClearAllConnections(); - DELETE(Conf); - ServerInstance->UnpublishInterface("SQL", this); - ServerInstance->UnpublishFeature("SQL"); - ServerInstance->DoneWithInterface("SQLutils"); + delete Conf; + ServerInstance->Modules->UnpublishInterface("SQL", this); + ServerInstance->Modules->UnpublishFeature("SQL"); + ServerInstance->Modules->DoneWithInterface("SQLutils"); } @@ -886,4 +886,3 @@ void* DispatcherThread(void* arg) } MODULE_INIT(ModuleSQL); - diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 393cbd1d7..0bc7dfd1c 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -723,20 +723,20 @@ class ModulePgSQL : public Module ModulePgSQL(InspIRCd* Me) : Module::Module(Me), currid(0) { - ServerInstance->UseInterface("SQLutils"); + ServerInstance->Modules->UseInterface("SQLutils"); sqlsuccess = new char[strlen(SQLSUCCESS)+1]; strlcpy(sqlsuccess, SQLSUCCESS, strlen(SQLSUCCESS)); - if (!ServerInstance->PublishFeature("SQL", this)) + if (!ServerInstance->Modules->PublishFeature("SQL", this)) { throw ModuleException("BUG: PgSQL Unable to publish feature 'SQL'"); } ReadConf(); - ServerInstance->PublishInterface("SQL", this); + ServerInstance->Modules->PublishInterface("SQL", this); } virtual ~ModulePgSQL() @@ -745,9 +745,9 @@ class ModulePgSQL : public Module ServerInstance->Timers->DelTimer(retimer); ClearAllConnections(); delete[] sqlsuccess; - ServerInstance->UnpublishInterface("SQL", this); - ServerInstance->UnpublishFeature("SQL"); - ServerInstance->DoneWithInterface("SQLutils"); + ServerInstance->Modules->UnpublishInterface("SQL", this); + ServerInstance->Modules->UnpublishFeature("SQL"); + ServerInstance->Modules->DoneWithInterface("SQLutils"); } void Implements(char* List) @@ -984,4 +984,3 @@ void SQLConn::DelayReconnect() } MODULE_INIT(ModulePgSQL); - diff --git a/src/modules/extra/m_sqlauth.cpp b/src/modules/extra/m_sqlauth.cpp index 6b05ee521..01d5733af 100644 --- a/src/modules/extra/m_sqlauth.cpp +++ b/src/modules/extra/m_sqlauth.cpp @@ -40,14 +40,14 @@ public: ModuleSQLAuth(InspIRCd* Me) : Module::Module(Me) { - ServerInstance->UseInterface("SQLutils"); - ServerInstance->UseInterface("SQL"); + ServerInstance->Modules->UseInterface("SQLutils"); + ServerInstance->Modules->UseInterface("SQL"); - SQLutils = ServerInstance->FindModule("m_sqlutils.so"); + 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."); - SQLprovider = ServerInstance->FindFeature("SQL"); + SQLprovider = ServerInstance->Modules->FindFeature("SQL"); if (!SQLprovider) throw ModuleException("Can't find an SQL provider module. Please load one before attempting to load m_sqlauth."); @@ -56,8 +56,8 @@ public: virtual ~ModuleSQLAuth() { - ServerInstance->DoneWithInterface("SQL"); - ServerInstance->DoneWithInterface("SQLutils"); + ServerInstance->Modules->DoneWithInterface("SQL"); + ServerInstance->Modules->DoneWithInterface("SQLutils"); } void Implements(char* List) @@ -191,4 +191,3 @@ public: }; MODULE_INIT(ModuleSQLAuth); - diff --git a/src/modules/extra/m_sqllog.cpp b/src/modules/extra/m_sqllog.cpp index 188f33447..fc929b94f 100644 --- a/src/modules/extra/m_sqllog.cpp +++ b/src/modules/extra/m_sqllog.cpp @@ -187,14 +187,14 @@ class ModuleSQLLog : public Module ModuleSQLLog(InspIRCd* Me) : Module::Module(Me) { - ServerInstance->UseInterface("SQLutils"); - ServerInstance->UseInterface("SQL"); + ServerInstance->Modules->UseInterface("SQLutils"); + ServerInstance->Modules->UseInterface("SQL"); - Module* SQLutils = ServerInstance->FindModule("m_sqlutils.so"); + Module* 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."); - SQLModule = ServerInstance->FindFeature("SQL"); + SQLModule = ServerInstance->Modules->FindFeature("SQL"); OnRehash(NULL,""); MyMod = this; @@ -203,8 +203,8 @@ class ModuleSQLLog : public Module virtual ~ModuleSQLLog() { - ServerInstance->DoneWithInterface("SQL"); - ServerInstance->DoneWithInterface("SQLutils"); + ServerInstance->Modules->DoneWithInterface("SQL"); + ServerInstance->Modules->DoneWithInterface("SQLutils"); } void Implements(char* List) @@ -311,4 +311,3 @@ class ModuleSQLLog : public Module }; MODULE_INIT(ModuleSQLLog); - diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index 520869e21..bb312ce8a 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -35,16 +35,16 @@ public: ModuleSQLOper(InspIRCd* Me) : Module::Module(Me) { - ServerInstance->UseInterface("SQLutils"); - ServerInstance->UseInterface("SQL"); - ServerInstance->UseInterface("HashRequest"); + ServerInstance->Modules->UseInterface("SQLutils"); + ServerInstance->Modules->UseInterface("SQL"); + ServerInstance->Modules->UseInterface("HashRequest"); /* Attempt to locate the md5 service provider, bail if we can't find it */ - HashModule = ServerInstance->FindModule("m_md5.so"); + HashModule = ServerInstance->Modules->Find("m_md5.so"); if (!HashModule) throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_sqloper.so."); - SQLutils = ServerInstance->FindModule("m_sqlutils.so"); + SQLutils = ServerInstance->Modules->Find("m_sqlutils.so"); if (!SQLutils) throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqloper.so."); @@ -53,9 +53,9 @@ public: virtual ~ModuleSQLOper() { - ServerInstance->DoneWithInterface("SQL"); - ServerInstance->DoneWithInterface("SQLutils"); - ServerInstance->DoneWithInterface("HashRequest"); + ServerInstance->Modules->DoneWithInterface("SQL"); + ServerInstance->Modules->DoneWithInterface("SQLutils"); + ServerInstance->Modules->DoneWithInterface("HashRequest"); } void Implements(char* List) @@ -91,7 +91,7 @@ public: { Module* target; - target = ServerInstance->FindFeature("SQL"); + target = ServerInstance->Modules->FindFeature("SQL"); if (target) { @@ -280,4 +280,3 @@ public: }; MODULE_INIT(ModuleSQLOper); - diff --git a/src/modules/extra/m_sqlutils.cpp b/src/modules/extra/m_sqlutils.cpp index b470f99af..2edf28263 100644 --- a/src/modules/extra/m_sqlutils.cpp +++ b/src/modules/extra/m_sqlutils.cpp @@ -37,12 +37,12 @@ public: ModuleSQLutils(InspIRCd* Me) : Module::Module(Me) { - ServerInstance->PublishInterface("SQLutils", this); + ServerInstance->Modules->PublishInterface("SQLutils", this); } virtual ~ModuleSQLutils() { - ServerInstance->UnpublishInterface("SQLutils", this); + ServerInstance->Modules->UnpublishInterface("SQLutils", this); } void Implements(char* List) @@ -235,4 +235,3 @@ public: }; MODULE_INIT(ModuleSQLutils); - diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 26f166996..de1f6d55f 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -90,7 +90,7 @@ class ModuleSSLGnuTLS : public Module ModuleSSLGnuTLS(InspIRCd* Me) : Module(Me) { - ServerInstance->PublishInterface("InspSocketHook", this); + ServerInstance->Modules->PublishInterface("InspSocketHook", this); // Not rehashable...because I cba to reduce all the sizes of existing buffers. inbufsize = ServerInstance->Config->NetBufferSize; @@ -854,4 +854,3 @@ class ModuleSSLGnuTLS : public Module }; MODULE_INIT(ModuleSSLGnuTLS); - diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 00c4c5fa3..f7beaede5 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -133,7 +133,7 @@ class ModuleSSLOpenSSL : public Module ModuleSSLOpenSSL(InspIRCd* Me) : Module(Me), PublicInstance(Me) { - ServerInstance->PublishInterface("InspSocketHook", this); + ServerInstance->Modules->PublishInterface("InspSocketHook", this); // Not rehashable...because I cba to reduce all the sizes of existing buffers. inbufsize = ServerInstance->Config->NetBufferSize; @@ -891,4 +891,3 @@ static int error_callback(const char *str, size_t len, void *u) } MODULE_INIT(ModuleSSLOpenSSL); - diff --git a/src/modules/extra/m_testclient.cpp b/src/modules/extra/m_testclient.cpp index f4e58b7b5..da0d36df8 100644 --- a/src/modules/extra/m_testclient.cpp +++ b/src/modules/extra/m_testclient.cpp @@ -41,7 +41,7 @@ public: virtual void OnBackgroundTimer(time_t foo) { - Module* target = ServerInstance->FindFeature("SQL"); + Module* target = ServerInstance->Modules->FindFeature("SQL"); if(target) { @@ -107,4 +107,3 @@ public: }; MODULE_INIT(ModuleTestClient); - |