From 8a3bcebffc063457b0e49f87ac5d80d18994e3f0 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 24 Jun 2008 16:27:16 +0000 Subject: This is more correct, thanks Phoenix git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9932 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ssl_gnutls.cpp | 5 ++--- src/modules/extra/m_ssl_openssl.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index fb50c0f09..9d9e08d4c 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -293,11 +293,12 @@ class ModuleSSLGnuTLS : public Module { User* user = (User*)item; - if(user->io) + if (user->io == this) { // User is using SSL, they're a local user, and they're using one of *our* SSL ports. // Potentially there could be multiple SSL modules loaded at once on different ports. ServerInstance->Users->QuitUser(user, "SSL module unloading"); + user->io = NULL; } if (user->GetExt("ssl_cert", dummy)) { @@ -306,8 +307,6 @@ class ModuleSSLGnuTLS : public Module delete tofree; user->Shrink("ssl_cert"); } - - user->io = NULL; } } diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index 4368c8d47..83ae36e73 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -318,11 +318,12 @@ class ModuleSSLOpenSSL : public Module { User* user = (User*)item; - if (user->GetExt("ssl", dummy) && IS_LOCAL(user) && user->io == this) + if (user->io == this) { // User is using SSL, they're a local user, and they're using one of *our* SSL ports. // Potentially there could be multiple SSL modules loaded at once on different ports. ServerInstance->Users->QuitUser(user, "SSL module unloading"); + user->io = NULL; } if (user->GetExt("ssl_cert", dummy)) { @@ -331,8 +332,6 @@ class ModuleSSLOpenSSL : public Module delete tofree; user->Shrink("ssl_cert"); } - - user->io = NULL; } } -- cgit v1.2.3