diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java index 6749d352..ec7c74f6 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/WebSocketService.java @@ -37,6 +37,7 @@ public class WebSocketService { public final ChannelGroup channels; public static ProviderMap providers = new ProviderMap<>(); + public final BiHookSet packetHook = new BiHookSet<>(); public static class WebSocketRequestContext { public WebSocketServerResponse response; @@ -64,6 +65,7 @@ public WebSocketService(ChannelGroup channels, LaunchServer server) { private final Gson gson; public void process(ChannelHandlerContext ctx, TextWebSocketFrame frame, Client client, String ip) { + if (packetHook.hook(frame, ctx)) return; String request = frame.text(); WebSocketServerResponse response = gson.fromJson(request, WebSocketServerResponse.class); process(ctx, response, client, ip);