summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_gnutls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra/m_ssl_gnutls.cpp')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 93fdcc8a1..d7be8b12b 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -81,10 +81,10 @@ class CommandStartTLS : public Command
}
else
{
- if (!user->io)
+ if (!user->GetIOHook())
{
user->WriteNumeric(670, "%s :STARTTLS successful, go ahead with TLS handshake", user->nick.c_str());
- user->io = Caller;
+ user->AddIOHook(Caller);
Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetPort());
}
else
@@ -303,12 +303,12 @@ class ModuleSSLGnuTLS : public Module
{
User* user = (User*)item;
- if (user->io == this)
+ if (user->GetIOHook() == 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;
+ user->DelIOHook();
}
if (user->GetExt("ssl_cert", dummy))
{
@@ -346,10 +346,10 @@ class ModuleSSLGnuTLS : public Module
virtual void OnHookUserIO(User* user, const std::string &targetip)
{
- if (!user->io && isin(targetip,user->GetPort(),listenports))
+ if (!user->GetIOHook() && isin(targetip,user->GetPort(),listenports))
{
/* Hook the user with our module */
- user->io = this;
+ user->AddIOHook(this);
}
}
@@ -646,7 +646,7 @@ class ModuleSSLGnuTLS : public Module
return;
// Bugfix, only send this numeric for *our* SSL users
- if (dest->GetExt("ssl", dummy) || ((IS_LOCAL(dest) && (dest->io == this))))
+ if (dest->GetExt("ssl", dummy) || ((IS_LOCAL(dest) && (dest->GetIOHook() == this))))
{
ServerInstance->SendWhoisLine(source, dest, 320, "%s %s :is using a secure connection", source->nick.c_str(), dest->nick.c_str());
}
@@ -929,7 +929,7 @@ class ModuleSSLGnuTLS : public Module
if (data->user->Shrink("tls"))
{
/* Not in our spec?!?! */
- data->user->io = this;
+ data->user->AddIOHook(this);
OnRawSocketAccept(data->user->GetFd(), data->user->GetIPString(),
data->user->GetPort());
}