From c4cb1f9477b1fbf8662bedb1c36f84ff6f87e1f3 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:48:23 +0000 Subject: Change OnHookUserIO to OnHookIO, making it usable for more than User* and less picky on string matching git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11628 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ssl_gnutls.cpp | 6 +++--- src/modules/extra/m_ssl_openssl.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 1c90428b2..7e3b62671 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -132,7 +132,7 @@ class ModuleSSLGnuTLS : public Module Implementation eventlist[] = { I_On005Numeric, I_OnRawSocketConnect, I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnCleanup, I_OnBufferFlushed, I_OnRequest, I_OnUnloadModule, I_OnRehash, I_OnModuleRehash, - I_OnPostConnect, I_OnEvent, I_OnHookUserIO }; + I_OnPostConnect, I_OnEvent, I_OnHookIO }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); ServerInstance->AddCommand(&starttls); @@ -346,9 +346,9 @@ class ModuleSSLGnuTLS : public Module output.append(" STARTTLS"); } - virtual void OnHookUserIO(User* user) + virtual void OnHookIO(EventHandler* user, ListenSocketBase* lsb) { - if (!user->GetIOHook() && isin(user->GetServerIP(),user->GetServerPort(),listenports)) + if (!user->GetIOHook() && isin(lsb->GetIP(),lsb->GetPort(),listenports)) { /* 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 55b7d8416..fc0de61f4 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -153,13 +153,13 @@ class ModuleSSLOpenSSL : public Module Implementation eventlist[] = { I_OnRawSocketConnect, I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketRead, I_OnRawSocketWrite, I_OnCleanup, I_On005Numeric, I_OnBufferFlushed, I_OnRequest, I_OnUnloadModule, I_OnRehash, I_OnModuleRehash, - I_OnPostConnect, I_OnHookUserIO }; + I_OnPostConnect, I_OnHookIO }; ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation)); } - virtual void OnHookUserIO(User* user) + virtual void OnHookIO(EventHandler* user, ListenSocketBase* lsb) { - if (!user->GetIOHook() && isin(user->GetServerIP(),user->GetServerPort(), listenports)) + if (!user->GetIOHook() && isin(lsb->GetIP(),lsb->GetPort(),listenports)) { /* Hook the user with our module */ user->AddIOHook(this); -- cgit v1.2.3