diff options
-rw-r--r-- | include/users.h | 2 | ||||
-rw-r--r-- | src/users.cpp | 10 |
2 files changed, 3 insertions, 9 deletions
diff --git a/include/users.h b/include/users.h index 83782d393..35c2647d8 100644 --- a/include/users.h +++ b/include/users.h @@ -673,7 +673,7 @@ class CoreExport User : public EventHandler /** Get IP string from sockaddr, using static internal buffer * @return The IP string */ - const char* GetIPString(bool translate4in6 = true); + const char* GetIPString(); /** Get a CIDR mask from the IP of this user, using a static internal buffer. * e.g., GetCIDRMask(16) for 223.254.214.52 returns 223.254.0.0/16 diff --git a/src/users.cpp b/src/users.cpp index bb427523a..4f0476911 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -98,7 +98,7 @@ void User::StartDNSLookup() try { bool cached = false; - const char* sip = this->GetIPString(false); + const char* sip = this->GetIPString(); UserResolver *res_reverse; /* Special case for 4in6 (Have i mentioned i HATE 4in6?) */ @@ -1233,7 +1233,7 @@ const char* User::GetCIDRMask(int range) return ""; // unused, but oh well } -const char* User::GetIPString(bool translate4in6) +const char* User::GetIPString() { static char buf[40]; @@ -1257,12 +1257,6 @@ const char* User::GetIPString(bool translate4in6) { strlcpy(&temp[1], buf, sizeof(temp) - 1); *temp = '0'; - if (translate4in6 && !strncmp(temp, "0::ffff:", 8)) - { - this->cachedip = temp + 8; - return temp + 8; - } - this->cachedip = temp; return temp; } |