diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-29 18:46:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-29 18:46:36 +0000 |
commit | 7547509db91a15dbbc67c84998a5ba630f87afc4 (patch) | |
tree | 08bef2418f2b063a4e0ebc54337dbcbc9e347212 | |
parent | a82e3bb5ae9c062fe9d4c5ff56675183cc29def2 (diff) |
Apply patch to fix ipv6 builds, contributed by danieldg, thanks :-)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9817 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/modules/m_cgiirc.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 6c99d9d35..318c1b3b4 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -346,9 +346,9 @@ public: ServerInstance->Users->RemoveCloneCounts(user); #ifdef IPV6 if (user->GetProtocolFamily() == AF_INET6) - valid = (inet_pton(AF_INET6, user->password, &((sockaddr_in6*)user->ip)->sin6_addr) > 0); + valid = (inet_pton(AF_INET6, user->password.c_str(), &((sockaddr_in6*)user->ip)->sin6_addr) > 0); else - valid = (inet_aton(user->password, &((sockaddr_in*)user->ip)->sin_addr)); + valid = (inet_aton(user->password.c_str(), &((sockaddr_in*)user->ip)->sin_addr)); #else if (inet_aton(user->password.c_str(), &((sockaddr_in*)user->ip)->sin_addr)) valid = true; diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 2cbd8fb99..e0ca026bb 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -394,15 +394,15 @@ class ModuleCloaking : public Module #ifdef IPV6 in6_addr testaddr; in_addr testaddr2; - if ((dest->GetProtocolFamily() == AF_INET6) && (inet_pton(AF_INET6,dest->host,&testaddr) < 1) && (hostcloak.length() <= 64)) + 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,&testaddr2) < 1) && (hostcloak.length() <= 64)) + 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) */ b = hostcloak; else /* Valid ipv6 or ipv4 address (not resolved) ipv4 or ipv6 user */ - b = ((!strchr(dest->host,':')) ? cu->Cloak4(dest->host) : cu->Cloak6(dest->host)); + b = ((!strchr(dest->host.c_str(),':')) ? cu->Cloak4(dest->host.c_str()) : cu->Cloak6(dest->host.c_str())); #else in_addr testaddr; if ((inet_aton(dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64)) |