]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Only output the 'AES on' message if the socket state isnt I_ERROR when its reached
[user/henk/code/inspircd.git] / src / users.cpp
index 46d841de56824bc27f7fb23966b6a8de5778729a..c15a3331b147d56c839340f7f110accb15f60d55 100644 (file)
@@ -1000,17 +1000,21 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
 
 long userrec::GlobalCloneCount()
 {
-       char u1[1024] = {0};
-       char u2[1024] = {0};
+       char u1[128] = {0};
+       char u2[128] = {0};
        long x = 0;
+       
+       this->GetIPString(u2);
+       
        for (user_hash::const_iterator a = ServerInstance->clientlist.begin(); a != ServerInstance->clientlist.end(); a++)
        {
                /* We have to match ip's as strings - we don't know what protocol
                 * a remote user may be using
                 */
-               if (!strcasecmp(a->second->GetIPString(u1), this->GetIPString(u2)))
-                               x++;
+               if (strcmp(a->second->GetIPString(u1), u2) == 0)
+                       x++;
        }
+       
        return x;
 }