add: detect if gm_gwsockets is install insted before require it

This commit is contained in:
Linventif 2024-05-08 01:50:09 +02:00
parent 0048a7cc19
commit 6916b91ee7
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24

View File

@ -2,17 +2,16 @@
// WebSocket // WebSocket
// //
require("gwsockets") if !file.Exists("bin/gm_gwsockets.dll", "LUA") then
timer.Simple(4, function()
if (!GWSockets) then gmInte.logHint("GWSockets is not installed !, Syncronize feature will not work !")
timer.Simple(1, function() gmInte.logHint("Please install it from https://github.com/FredyH/GWSockets/releases")
if (!GWSockets) then
gmInte.logError("GWSockets is not installed! Please install it from https://github.com/FredyH/GWSockets/releases")
end
end) end)
return return
end end
require("gwsockets")
local function getWebSocketURL() local function getWebSocketURL()
return "wss://" .. gmInte.config.websocketFQDN return "wss://" .. gmInte.config.websocketFQDN
end end