summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-05 22:30:39 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-05 22:30:39 +0000
commit1b67662bc821eb1d0edb2578fdc637193884f24c (patch)
treeac35b9149b97b3a4c0c32c96f01954063a3c60ee /src/modules/m_cloaking.cpp
parent012556497285a914f5756bf893c7392c2b2a3b7a (diff)
Extra stuff for identifying ipv6 addresses
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4726 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index b3aa8c0fa..717bbc436 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -304,15 +304,19 @@ class CloakUser : public ModeHandler
* are connecting via localhost) -- this doesnt matter much.
*/
- if (strchr(dest->host,'.'))
+ if (strchr(dest->host,'.') || strchr(dest->host,':'))
{
/* InspIRCd users have two hostnames; A displayed
* hostname which can be modified by modules (e.g.
* to create vhosts, implement chghost, etc) and a
* 'real' hostname which you shouldnt write to.
*/
-
- std::string a = strstr(dest->host,".");
+
+ char* n = strstr(dest->host,".");
+ if (!n)
+ n = strstr(dest->host,":");
+
+ std::string a = n;
char ra[64];
this->GenHash(dest->host,ra);
@@ -325,7 +329,7 @@ class CloakUser : public ModeHandler
* Their ISP shouldnt go to town on subdomains, or they shouldnt have a kiddie
* vhost.
*/
-
+
if ((insp_aton(dest->host,&testaddr) < 1) && (hostcloak.length() < 64))
{
// if they have a hostname, make something appropriate