From e20a0915892b965b345db80d25fed25b8ef3a52f Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 11 Apr 2008 00:03:03 +0000 Subject: Much faster way of checking if the user is 4in6, avoid strncmp in User::GetIPString(), do it in User::SetSockAddr() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9455 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/users.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index c563431d2..f91e8b152 100644 --- a/include/users.h +++ b/include/users.h @@ -653,7 +653,7 @@ class CoreExport User : public connection /** Get IP string from sockaddr, using static internal buffer * @return The IP string */ - const char* GetIPString(); + const char* GetIPString(bool translate4in6 = true); /* Write error string */ @@ -663,6 +663,10 @@ class CoreExport User : public connection */ bool exempt; + /** True if the user is a 4in6 ip (0::ffff:1.2.3.4) and requires special translation in GetIPString() + */ + bool is4in6; + /** This value contains how far into the penalty threshold the user is. Once its over * the penalty threshold then commands are held and processed on-timer. */ -- cgit v1.2.3