#include "configreader.h"
#include "socket.h"
#include "inspircd.h"
-#include "inspstring.h"
#include "socketengine.h"
#include "wildcard.h"
}
}
-void ListenSocket::HandleEvent(EventType et)
+void ListenSocket::HandleEvent(EventType et, int errornum)
{
insp_sockaddr sock_us; // our port number
socklen_t uslen; // length of our port number
else
{
/* No 'number of bits' field! */
+ free(mask);
return false;
}
}
/* XXX: Probably belongs in class InspIRCd */
-int InspIRCd::BindPorts(bool bail)
+int InspIRCd::BindPorts(bool bail, int &ports_found)
{
char configToken[MAXBUF], Addr[MAXBUF], Type[MAXBUF];
insp_sockaddr client, server;
int clientportcount = 0;
int BoundPortCount = 0;
+ ports_found = 0;
+
if (!bail)
{
int InitialPortCount = stats->BoundPortCount;
if (((!*Type) || (!strcmp(Type,"clients"))) && (!HasPort(atoi(configToken),Addr)))
{
+ ports_found++;
// modules handle server bind types now
Config->ports[clientportcount+InitialPortCount] = atoi(configToken);
if (*Addr == '*')
if ((!*Type) || (!strcmp(Type,"clients")))
{
+ ports_found++;
// modules handle server bind types now
Config->ports[clientportcount] = atoi(configToken);