From bfcaef8623bb3f8faf1141eb7b3805ab75ae97dd Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 May 2007 18:38:00 +0000 Subject: Refactor port binding, warning not yet tested fully git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6982 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_xmlsocket.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/modules/m_xmlsocket.cpp') diff --git a/src/modules/m_xmlsocket.cpp b/src/modules/m_xmlsocket.cpp index 09ffe6ca9..1cf9fafa2 100644 --- a/src/modules/m_xmlsocket.cpp +++ b/src/modules/m_xmlsocket.cpp @@ -62,9 +62,9 @@ class ModuleXMLSocket : public Module if (ServerInstance->Config->AddIOHook(portno, this)) { listenports.push_back(portno); - for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++) - if (ServerInstance->Config->ports[i] == portno) - ServerInstance->Config->openSockfd[i]->SetDescription("xml"); + for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++) + if (ServerInstance->Config->ports[i]->GetPort() == portno) + ServerInstance->Config->ports[i]->SetDescription("xml"); } else { @@ -93,10 +93,9 @@ class ModuleXMLSocket : public Module for(unsigned int i = 0; i < listenports.size(); i++) { ServerInstance->Config->DelIOHook(listenports[i]); - for (unsigned int j = 0; j < ServerInstance->stats->BoundPortCount; j++) - if (ServerInstance->Config->ports[j] == listenports[i]) - if (ServerInstance->Config->openSockfd[j]) - ServerInstance->Config->openSockfd[j]->SetDescription("plaintext"); + for (size_t j = 0; j < ServerInstance->Config->ports.size(); j++) + if (ServerInstance->Config->ports[j]->GetPort() == listenports[i]) + ServerInstance->Config->ports[j]->SetDescription("plaintext"); } } } -- cgit v1.2.3