diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-07 20:07:50 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-07 20:07:50 +0000 |
commit | 78c14ffcc5429f4855e2f3a6c822a1d37f9f591a (patch) | |
tree | b40781d00ea751f1728090ca0733e6fe334bbf4b /src/modules/extra/m_ssl_gnutls.cpp | |
parent | efee3a4d4ec21a32bb46185e1b997947c9d5daf2 (diff) |
Merge the second interface for socket hooking into one, so it's all done by Add/Del/GetIOHook now.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10457 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 | 16 |
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()); } |