summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-28 23:20:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-28 23:20:28 +0000
commite79930ac02de36ec9b5bd3079955fc21b6f9b603 (patch)
treede4a396ea17ad8855bc6b9c9c2a68c62131ba6c1
parentdad5d5ed15bad4c5ec342c0a451c68a0900a7ecc (diff)
Remove one (now unneeded) 4in6 hack.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10744 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--include/users.h2
-rw-r--r--src/users.cpp10
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;
}