X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_cloaking.cpp;h=1b6d2b6bb6b32e58aa8bcce5bdaabad866a06897;hb=fcafba14c5408360ec725ed1649ede75b7ae52c1;hp=58de93da9d305fbe9cb3f19951f7e6ad4b10ab32;hpb=73de881eafbd3d201ce4be472bd35349773d74bd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 58de93da9..1b6d2b6bb 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -160,11 +160,6 @@ class CloakUser : public ModeHandler std::string Cloak6(const char* ip) { - /* Theyre using 4in6 (YUCK). Translate as ipv4 cloak */ - if (!strncmp(ip, "0::ffff:", 8)) - return Cloak4(ip + 8); - - /* If we get here, yes it really is an ipv6 ip */ unsigned int iv[] = { key1, key2, key3, key4 }; std::vector hashies; std::string item; @@ -337,11 +332,11 @@ class ModuleCloaking : public Module void Prioritize() { /* Needs to be after m_banexception etc. */ - ServerInstance->Modules->SetPriority(this, I_OnCheckBan, PRIO_LAST); + ServerInstance->Modules->SetPriority(this, I_OnCheckBan, PRIORITY_LAST); /* but before m_conn_umodes, so host is generated ready to apply */ Module *um = ServerInstance->Modules->Find("m_conn_umodes.so"); - ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIO_AFTER, &um); + ServerInstance->Modules->SetPriority(this, I_OnUserConnect, PRIORITY_AFTER, &um); } virtual void OnUserDisconnect(User* user) @@ -418,10 +413,8 @@ class ModuleCloaking : public Module #ifdef IPV6 in6_addr testaddr; in_addr testaddr2; - if ((dest->GetProtocolFamily() == AF_INET6) && - (inet_pton(AF_INET6,dest->host.c_str(),&testaddr) < 1) && - (inet_aton(dest->host.c_str(),&testaddr2) < 1) && (hostcloak.length() <= 64)) - /* Invalid ipv4/ipv6 address, and ipv6 user (resolved host) */ + if ((dest->GetProtocolFamily() == AF_INET6) && (inet_pton(AF_INET6,dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64)) + /* Invalid ipv6 address, and ipv6 user (resolved host) */ b = hostcloak; else if ((dest->GetProtocolFamily() == AF_INET) && (inet_aton(dest->host.c_str(),&testaddr2) < 1) && (hostcloak.length() <= 64)) /* Invalid ipv4 address, and ipv4 user (resolved host) */