summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authoriwalkalone <iwalkalone69@gmail.com>2019-12-06 18:07:49 +0100
committerP. Powell <petpow@saberuk.com>2019-12-06 19:30:11 +0000
commitaea5500b46890665ccb26d436217cb7014e93a32 (patch)
treeeffe05197adac24dfaa7af2156d0ee994d320426 /src/modules
parent7f36a337134102b46e4b1c80d989f38ee08ec194 (diff)
Fixing MatchCIDR call when checking proxy range
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_websocket.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp
index 5f0f9bcc8..8ec896847 100644
--- a/src/modules/m_websocket.cpp
+++ b/src/modules/m_websocket.cpp
@@ -363,10 +363,10 @@ class WebSocketHook : public IOHookMiddle
for (WebSocketConfig::ProxyRanges::const_iterator iter = config.proxyranges.begin(); iter != config.proxyranges.end(); ++iter)
{
- if (InspIRCd::MatchCIDR(*iter, luser->GetIPString(), ascii_case_insensitive_map))
+ if (InspIRCd::MatchCIDR(luser->GetIPString(), *iter, ascii_case_insensitive_map))
{
// Give the user their real IP address.
- if (realsa == luser->client_sa)
+ if (realsa != luser->client_sa)
luser->SetClientIP(realsa);
break;
}