summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:07:36 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:07:36 +0000
commit7a672d42e4173e274ac0ee31331d41e45801facc (patch)
tree72ad0edb4d7a8b8cf0be854b784c328b6757327a /src/modules/extra
parent6278262baaed06e2acf134c53ed0485136d61f50 (diff)
Remove more text<->binary IP conversions, making code more IPv4/IPv6 independent
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11578 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp6
-rw-r--r--src/modules/extra/m_ziplink.cpp2
3 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 2fa060360..b2b59e612 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -81,7 +81,7 @@ class CommandStartTLS : public Command
{
user->WriteNumeric(670, "%s :STARTTLS successful, go ahead with TLS handshake", user->nick.c_str());
user->AddIOHook(Caller);
- Caller->OnRawSocketAccept(user->GetFd(), user->GetIPString(), user->GetServerPort());
+ Caller->OnRawSocketAccept(user->GetFd(), NULL, NULL);
}
else
user->WriteNumeric(691, "%s :STARTTLS failure", user->nick.c_str());
@@ -347,9 +347,9 @@ class ModuleSSLGnuTLS : public Module
output.append(" STARTTLS");
}
- virtual void OnHookUserIO(User* user, const std::string &targetip)
+ virtual void OnHookUserIO(User* user)
{
- if (!user->GetIOHook() && isin(targetip,user->GetServerPort(),listenports))
+ if (!user->GetIOHook() && isin(user->GetServerIP(),user->GetServerPort(),listenports))
{
/* Hook the user with our module */
user->AddIOHook(this);
@@ -421,7 +421,7 @@ class ModuleSSLGnuTLS : public Module
}
- virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
+ virtual void OnRawSocketAccept(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
/* Are there any possibilities of an out of range fd? Hope not, but lets be paranoid */
if ((fd < 0) || (fd > ServerInstance->SE->GetMaxFds() - 1))
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 0259c105a..447f35940 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -157,9 +157,9 @@ class ModuleSSLOpenSSL : public Module
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- virtual void OnHookUserIO(User* user, const std::string &targetip)
+ virtual void OnHookUserIO(User* user)
{
- if (!user->GetIOHook() && isin(targetip,user->GetServerPort(), listenports))
+ if (!user->GetIOHook() && isin(user->GetServerIP(),user->GetServerPort(), listenports))
{
/* Hook the user with our module */
user->AddIOHook(this);
@@ -424,7 +424,7 @@ class ModuleSSLOpenSSL : public Module
}
- virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
+ virtual void OnRawSocketAccept(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
/* Are there any possibilities of an out of range fd? Hope not, but lets be paranoid */
if ((fd < 0) || (fd > ServerInstance->SE->GetMaxFds() - 1))
diff --git a/src/modules/extra/m_ziplink.cpp b/src/modules/extra/m_ziplink.cpp
index b42d18f8c..efff13644 100644
--- a/src/modules/extra/m_ziplink.cpp
+++ b/src/modules/extra/m_ziplink.cpp
@@ -211,7 +211,7 @@ class ModuleZLib : public Module
session->status = IZIP_OPEN;
}
- virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport)
+ virtual void OnRawSocketAccept(int fd, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*)
{
/* Nothing special needs doing here compared to connect() */
OnRawSocketConnect(fd);