]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socket.cpp
Fixed broken syncing for glines and elines using idents - thanks to dotslasher for...
[user/henk/code/inspircd.git] / src / socket.cpp
index 225b27733fef3cd76da2409802520552e73bb3d4..6d7fc45d6108be4deb84f0b3683d1e6da2df86d4 100644 (file)
@@ -389,13 +389,15 @@ bool InspIRCd::HasPort(int port, char* addr)
 }
 
 /* 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;
@@ -409,6 +411,7 @@ int InspIRCd::BindPorts(bool bail)
 
                        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 == '*')
@@ -468,6 +471,7 @@ int InspIRCd::BindPorts(bool bail)
 
                if ((!*Type) || (!strcmp(Type,"clients")))
                {
+                       ports_found++;
                        // modules handle server bind types now
                        Config->ports[clientportcount] = atoi(configToken);