summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 796893be6..c98a69025 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1003,19 +1003,20 @@ void userrec::AddClient(InspIRCd* Instance, int socket, int port, bool iscached,
long userrec::GlobalCloneCount()
{
- char u1[128];
char u2[128];
long x = 0;
+ strlcpy(u2, this->GetIPString(), 64);
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 (strcmp(a->second->GetIPString(u1), this->GetIPString(u2)) == 0)
+ ServerInstance->Log(DEBUG,"Match %s against %s", a->second->GetIPString(), u2);
+ if (strcasecmp(a->second->GetIPString(), u2) == 0)
x++;
}
-
+
return x;
}