summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-11 00:03:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-11 00:03:03 +0000
commite20a0915892b965b345db80d25fed25b8ef3a52f (patch)
tree12c35f8d4c9043765c668ae7495a2dc4d52b916a /include/users.h
parente6de2ea580f3fa25dbe8bdd2ed8267e18144b315 (diff)
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
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h6
1 files changed, 5 insertions, 1 deletions
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.
*/