summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-06 22:37:36 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-06 22:37:36 +0000
commita26502ff51141c3cd74c078876d3322b49a3833c (patch)
tree3f1264fc7ff0be5f1f1f8eb6f82861b73081cc0c /src/modules
parent1b823b21c71a9047a9bbb5fa931085bb4929f26a (diff)
Move StreamSocket inheritance off of User
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12047 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp10
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp3
-rw-r--r--src/modules/m_cgiirc.cpp4
-rw-r--r--src/modules/m_dnsbl.cpp2
4 files changed, 9 insertions, 10 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index d4422a3de..bd22404b3 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -106,11 +106,11 @@ class CommandStartTLS : public SplitCommand
}
else
{
- if (!user->GetIOHook())
+ if (!user->eh.GetIOHook())
{
user->WriteNumeric(670, "%s :STARTTLS successful, go ahead with TLS handshake", user->nick.c_str());
- user->AddIOHook(creator);
- creator->OnStreamSocketAccept(user, NULL, NULL);
+ user->eh.AddIOHook(creator);
+ creator->OnStreamSocketAccept(&user->eh, NULL, NULL);
}
else
user->WriteNumeric(691, "%s :STARTTLS failure", user->nick.c_str());
@@ -129,6 +129,7 @@ class ModuleSSLGnuTLS : public Module
std::string keyfile;
std::string certfile;
+
std::string cafile;
std::string crlfile;
std::string sslports;
@@ -298,12 +299,11 @@ class ModuleSSLGnuTLS : public Module
{
LocalUser* user = IS_LOCAL(static_cast<User*>(item));
- if (user && user->GetIOHook() == this)
+ if (user && user->eh.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->DelIOHook();
}
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 61b54eceb..5eac93af6 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -250,12 +250,11 @@ class ModuleSSLOpenSSL : public Module
{
LocalUser* user = IS_LOCAL((User*)item);
- if (user && user->GetIOHook() == this)
+ if (user && user->eh.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->DelIOHook();
}
}
}
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp
index cc1e34368..07cf3c376 100644
--- a/src/modules/m_cgiirc.cpp
+++ b/src/modules/m_cgiirc.cpp
@@ -112,7 +112,7 @@ class CGIResolver : public Resolver
virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
{
/* Check the user still exists */
- if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
+ if ((them) && (&them->eh == ServerInstance->SE->GetRef(theirfd)))
{
if (notify)
ServerInstance->SNO->WriteGlobalSno('a', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick.c_str(), them->host.c_str(), result.c_str(), typ.c_str());
@@ -129,7 +129,7 @@ class CGIResolver : public Resolver
virtual void OnError(ResolverError e, const std::string &errormessage)
{
- if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
+ if ((them) && (&them->eh == ServerInstance->SE->GetRef(theirfd)))
{
if (notify)
ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 486a816da..d6622dc77 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -63,7 +63,7 @@ class DNSBLResolver : public Resolver
virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
{
/* Check the user still exists */
- if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
+ if ((them) && (&them->eh == ServerInstance->SE->GetRef(theirfd)))
{
// Now we calculate the bitmask: 256*(256*(256*a+b)+c)+d
if(result.length())