diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-26 22:28:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-26 22:28:29 +0000 |
commit | 3bd571b8bb0cdc2900407a342dd3a77aff2c2d2a (patch) | |
tree | cbcc58e165b094d320e87f5dd555b7f8aa8071d1 /src | |
parent | 3c3b338a9dd8c63d3d2d197d1d284bb91543ee44 (diff) |
Fix broken GlobalCloneCount (AGAIN).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5544 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_check.cpp | 2 | ||||
-rw-r--r-- | src/users.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 3a8b8dd92..6a4bcc84f 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -123,7 +123,7 @@ class cmd_check : public command_t /* * Unlike Asuka, I define a clone as coming from the same host. --w00t */ - snprintf(tmpbuf, MAXBUF, "%lu %s%s (%s@%s) %s ", i->second->GlobalCloneCount(), targchan->GetAllPrefixChars(i->second), i->second->nick, i->second->ident, i->second->dhost, i->second->fullname); + snprintf(tmpbuf, MAXBUF, "%d %s%s (%s@%s) %s ", i->second->GlobalCloneCount(), targchan->GetAllPrefixChars(i->second), i->second->nick, i->second->ident, i->second->dhost, i->second->fullname); user->WriteServ(checkstr + " member " + tmpbuf); } } 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; } |