summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:33 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:33 +0000
commitd221de88276b9e33a108281a9cd0a58875032fc6 (patch)
tree3032609bd5ef7f4a6a4bad5c0b2a4100432ea2df /src/modules/extra
parentdcbb0ae938711cd49df73dc2ff6cd6289aeefb44 (diff)
Kill ListenSocketBase, use OnAcceptConnection for all new connections
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11950 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp12
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp12
2 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 29e439ed3..25b47c2fe 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -173,14 +173,14 @@ class ModuleSSLGnuTLS : public Module
for (size_t i = 0; i < ServerInstance->ports.size(); i++)
{
- ListenSocketBase* port = ServerInstance->ports[i];
- if (port->hook != "gnutls")
+ ListenSocket* port = ServerInstance->ports[i];
+ if (port->bind_tag->getString("ssl") != "gnutls")
continue;
- const std::string& portid = port->GetBindDesc();
+ const std::string& portid = port->bind_desc;
ServerInstance->Logs->Log("m_ssl_gnutls", DEFAULT, "m_ssl_gnutls.so: Enabling SSL for port %s", portid.c_str());
- if (port->type == "clients" && port->GetIP() != "127.0.0.1")
+ if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
sslports.append(portid).append(";");
}
@@ -321,9 +321,9 @@ class ModuleSSLGnuTLS : public Module
output.append(" STARTTLS");
}
- void OnHookIO(StreamSocket* user, ListenSocketBase* lsb)
+ void OnHookIO(StreamSocket* user, ListenSocket* lsb)
{
- if (!user->GetIOHook() && lsb->hook == "gnutls")
+ if (!user->GetIOHook() && lsb->bind_tag->getString("ssl") == "gnutls")
{
/* Hook the user with our module */
user->AddIOHook(this);
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 0c01e4d08..25d1cd9dd 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -131,9 +131,9 @@ class ModuleSSLOpenSSL : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- void OnHookIO(StreamSocket* user, ListenSocketBase* lsb)
+ void OnHookIO(StreamSocket* user, ListenSocket* lsb)
{
- if (!user->GetIOHook() && lsb->hook == "openssl")
+ if (!user->GetIOHook() && lsb->bind_tag->getString("ssl") == "openssl")
{
/* Hook the user with our module */
user->AddIOHook(this);
@@ -148,13 +148,13 @@ class ModuleSSLOpenSSL : public Module
for (size_t i = 0; i < ServerInstance->ports.size(); i++)
{
- ListenSocketBase* port = ServerInstance->ports[i];
- if (port->hook != "openssl")
+ ListenSocket* port = ServerInstance->ports[i];
+ if (port->bind_tag->getString("ssl") != "openssl")
continue;
- std::string portid = port->GetBindDesc();
+ std::string portid = port->bind_desc;
ServerInstance->Logs->Log("m_ssl_openssl", DEFAULT, "m_ssl_openssl.so: Enabling SSL for port %s", portid.c_str());
- if (port->type == "clients" && port->GetIP() != "127.0.0.1")
+ if (port->bind_tag->getString("type", "clients") == "clients" && port->bind_addr != "127.0.0.1")
sslports.append(portid).append(";");
}