From e79930ac02de36ec9b5bd3079955fc21b6f9b603 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 28 Oct 2008 23:20:28 +0000 Subject: Remove one (now unneeded) 4in6 hack. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10744 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 2 +- 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; } -- cgit v1.2.3