diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 11:33:10 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 11:33:10 +0000 |
commit | 09afa5085614e0224a296abd082fce205003c3fe (patch) | |
tree | 444d54deea5f10e3045e0a8a016f9623499f513e /src/modules/extra | |
parent | 6d4128715da39b1e097642a64ee0bd40586d9a38 (diff) |
ServerConfig extern moved into class InspIRCd
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4808 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_filter_pcre.cpp | 1 | ||||
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 1 | ||||
-rw-r--r-- | src/modules/extra/m_sqloper.cpp | 1 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 13 | ||||
-rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 13 |
5 files changed, 16 insertions, 13 deletions
diff --git a/src/modules/extra/m_filter_pcre.cpp b/src/modules/extra/m_filter_pcre.cpp index 26d231b14..da7559914 100644 --- a/src/modules/extra/m_filter_pcre.cpp +++ b/src/modules/extra/m_filter_pcre.cpp @@ -27,6 +27,7 @@ using namespace std; #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "inspircd.h" class FilterPCREException : public ModuleException { diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 7f2b96227..79baf170c 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -24,6 +24,7 @@ using namespace std; #include "channels.h" #include "modules.h" #include "helperfuncs.h" +#include "inspircd.h" #include "m_sqlv2.h" /* VERSION 2 API: With nonblocking (threaded) requests */ diff --git a/src/modules/extra/m_sqloper.cpp b/src/modules/extra/m_sqloper.cpp index a67ec46e2..89383ee47 100644 --- a/src/modules/extra/m_sqloper.cpp +++ b/src/modules/extra/m_sqloper.cpp @@ -30,7 +30,6 @@ /* Required for the FOREACH_MOD alias (OnOper event) */ extern int MODCOUNT; -extern ServerConfig* Config; extern std::vector<Module*> modules; extern std::vector<ircd_module*> factory; diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index d9ee49bd0..30ece8f60 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -11,11 +11,14 @@ #include "helperfuncs.h" #include "socket.h" #include "hashcomp.h" +#include "inspircd.h" /* $ModDesc: Provides SSL support for clients */ /* $CompileFlags: `libgnutls-config --cflags` */ /* $LinkerFlags: `libgnutls-config --libs` `perl ../gnutls_rpath.pl` */ +extern InspIRCd* ServerInstance; + enum issl_status { ISSL_NONE, ISSL_HANDSHAKING_READ, ISSL_HANDSHAKING_WRITE, ISSL_HANDSHAKEN, ISSL_CLOSING, ISSL_CLOSED }; bool isin(int port, const std::vector<int> &portlist) @@ -41,7 +44,6 @@ public: class ModuleSSLGnuTLS : public Module { Server* Srv; - ServerConfig* SrvConf; ConfigReader* Conf; char* dummy; @@ -68,10 +70,9 @@ class ModuleSSLGnuTLS : public Module : Module::Module(Me) { Srv = Me; - SrvConf = Srv->GetConfig(); // Not rehashable...because I cba to reduce all the sizes of existing buffers. - inbufsize = SrvConf->NetBufferSize; + inbufsize = ServerInstance->Config->NetBufferSize; gnutls_global_init(); // This must be called once in the program @@ -98,7 +99,7 @@ class ModuleSSLGnuTLS : public Module for(unsigned int i = 0; i < listenports.size(); i++) { - SrvConf->DelIOHook(listenports[i]); + ServerInstance->Config->DelIOHook(listenports[i]); } listenports.clear(); @@ -110,7 +111,7 @@ class ModuleSSLGnuTLS : public Module { // Get the port we're meant to be listening on with SSL unsigned int port = Conf->ReadInteger("bind", "port", i, true); - if(SrvConf->AddIOHook(port, this)) + if (ServerInstance->Config->AddIOHook(port, this)) { // We keep a record of which ports we're listening on with SSL listenports.push_back(port); @@ -222,7 +223,7 @@ class ModuleSSLGnuTLS : public Module log(DEBUG, "m_ssl_gnutls.so: Killed %d users for unload of GnuTLS SSL module", numusers); for(unsigned int i = 0; i < listenports.size(); i++) - SrvConf->DelIOHook(listenports[i]); + ServerInstance->Config->DelIOHook(listenports[i]); } } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index b2883c0f0..c0f02f322 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -12,11 +12,14 @@ #include "helperfuncs.h" #include "socket.h" #include "hashcomp.h" +#include "inspircd.h" /* $ModDesc: Provides SSL support for clients */ /* $CompileFlags: -I/usr/include -I/usr/local/include */ /* $LinkerFlags: -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/lib -Wl,--rpath -Wl,/usr/lib -lssl */ +extern InspIRCd* ServerInstance; + enum issl_status { ISSL_NONE, ISSL_HANDSHAKING, ISSL_OPEN }; enum issl_io_status { ISSL_WRITE, ISSL_READ }; @@ -57,7 +60,6 @@ public: class ModuleSSLOpenSSL : public Module { Server* Srv; - ServerConfig* SrvConf; ConfigReader* Conf; CullList culllist; @@ -83,10 +85,9 @@ class ModuleSSLOpenSSL : public Module : Module::Module(Me) { Srv = Me; - SrvConf = Srv->GetConfig(); // Not rehashable...because I cba to reduce all the sizes of existing buffers. - inbufsize = SrvConf->NetBufferSize; + inbufsize = ServerInstance->Config->NetBufferSize; /* Global SSL library initialization*/ SSL_library_init(); @@ -108,7 +109,7 @@ class ModuleSSLOpenSSL : public Module for(unsigned int i = 0; i < listenports.size(); i++) { - SrvConf->DelIOHook(listenports[i]); + ServerInstance->Config->DelIOHook(listenports[i]); } listenports.clear(); @@ -120,7 +121,7 @@ class ModuleSSLOpenSSL : public Module { // Get the port we're meant to be listening on with SSL unsigned int port = Conf->ReadInteger("bind", "port", i, true); - if(SrvConf->AddIOHook(port, this)) + if (ServerInstance->Config->AddIOHook(port, this)) { // We keep a record of which ports we're listening on with SSL listenports.push_back(port); @@ -246,7 +247,7 @@ class ModuleSSLOpenSSL : public Module log(DEBUG, "m_ssl_openssl.so: Killed %d users for unload of OpenSSL SSL module", numusers); for(unsigned int i = 0; i < listenports.size(); i++) - SrvConf->DelIOHook(listenports[i]); + ServerInstance->Config->DelIOHook(listenports[i]); } } |