summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-11-19 20:29:54 +0000
committerSadie Powell <sadie@witchery.services>2020-11-20 12:10:47 +0000
commit061a2e1aed3727b785976ea167cf2084d3e8f0f9 (patch)
tree4534e6e78ed3134b4b3e9f4840a8353fd4425e58 /src
parentd4685e02b55229e0ca5068b839c87b5a80180f33 (diff)
Fail websocket connections if changing the user's IP errors.
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_websocket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp
index e2b0ee30a..1cba6bca6 100644
--- a/src/modules/m_websocket.cpp
+++ b/src/modules/m_websocket.cpp
@@ -370,6 +370,10 @@ class WebSocketHook : public IOHookMiddle
// Give the user their real IP address.
if (realsa != luser->client_sa)
luser->SetClientIP(realsa);
+
+ // Error if changing their IP gets them banned.
+ if (luser->quitting)
+ return -1;
break;
}
}