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
|
||||
//
|
||||
|
||||
require("gwsockets")
|
||||
|
||||
if (!GWSockets) then
|
||||
timer.Simple(1, function()
|
||||
if (!GWSockets) then
|
||||
gmInte.logError("GWSockets is not installed! Please install it from https://github.com/FredyH/GWSockets/releases")
|
||||
end
|
||||
if !file.Exists("bin/gm_gwsockets.dll", "LUA") then
|
||||
timer.Simple(4, function()
|
||||
gmInte.logHint("GWSockets is not installed !, Syncronize feature will not work !")
|
||||
gmInte.logHint("Please install it from https://github.com/FredyH/GWSockets/releases")
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
require("gwsockets")
|
||||
|
||||
local function getWebSocketURL()
|
||||
return "wss://" .. gmInte.config.websocketFQDN
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user