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/m_ssl_gnutls.cpp | |
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/m_ssl_gnutls.cpp')
-rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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]); } } |