summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}