summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_cgiirc.cpp4
-rw-r--r--src/modules/m_cloaking.cpp6
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))