Disable WebSocket feature if GWSockets is not installed

This commit is contained in:
Linventif 2024-01-15 05:45:10 +01:00
parent e6f7d5bead
commit d1b3876574

View File

@ -15,6 +15,7 @@ for k, v in pairs(websocketFeature) do
end
if (!useWebsocket) then
gmInte.config.websocket = false
return gmInte.log("WebSocket is not used")
end
@ -26,11 +27,12 @@ if (!GWSockets) then
gmInte.logError("GWSockets is not installed! Please install it from https://github.com/FredyH/GWSockets/releases")
end
end)
gmInte.config.websocket = false
return
else
gmInte.config.websocket = true
end
gmInte.config.websocket = true
local socket = GWSockets.createWebSocket("wss://ws.gmod-integration.com")
// Authentication