From 78c14ffcc5429f4855e2f3a6c822a1d37f9f591a Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 7 Sep 2008 20:07:50 +0000 Subject: 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 --- src/modules/m_xmlsocket.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_xmlsocket.cpp') diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp index cc14dee97..a60512d30 100644 --- a/src/modules/m_xmlsocket.cpp +++ b/src/modules/m_xmlsocket.cpp @@ -102,8 +102,8 @@ class ModuleXMLSocket : public Module if(target_type == TYPE_USER) { User* user = (User*)item; - if(user->io == this) - user->io = NULL; + if(user->GetIOHook() == this) + user->DelIOHook(); } } @@ -114,10 +114,10 @@ class ModuleXMLSocket : 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); } } -- cgit v1.3.1-10-gc9f91