mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +00:00
add: detect if gm_gwsockets is install insted before require it
This commit is contained in:
parent
0048a7cc19
commit
6916b91ee7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user