diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-11 00:03:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-11 00:03:03 +0000 |
commit | e20a0915892b965b345db80d25fed25b8ef3a52f (patch) | |
tree | 12c35f8d4c9043765c668ae7495a2dc4d52b916a /include | |
parent | e6de2ea580f3fa25dbe8bdd2ed8267e18144b315 (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')
-rw-r--r-- | include/users.h | 6 |
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. */ |