summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_openssl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_ssl_openssl.cpp')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp13
1 files changed, 7 insertions, 6 deletions
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]);
}
}