]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fail websocket connections if changing the user's IP errors.
authorSadie Powell <sadie@witchery.services>
Thu, 19 Nov 2020 20:29:54 +0000 (20:29 +0000)
committerSadie Powell <sadie@witchery.services>
Fri, 20 Nov 2020 12:10:47 +0000 (12:10 +0000)
src/modules/m_websocket.cpp

index e2b0ee30ad8d4b08217f0e159ca5952175cc033b..1cba6bca6ad5ca06202b2a6c740003b8478e4ec5 100644 (file)
@@ -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;
                                }
                        }