From 581c27044689dc22d4e7854edae8746309750174 Mon Sep 17 00:00:00 2001 From: Linventif Date: Wed, 8 May 2024 02:29:00 +0200 Subject: [PATCH] fix: gwsockets auto detect --- lua/gmod_integration/server/sv__websocket.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/gmod_integration/server/sv__websocket.lua b/lua/gmod_integration/server/sv__websocket.lua index 625665e..6f4f7a1 100644 --- a/lua/gmod_integration/server/sv__websocket.lua +++ b/lua/gmod_integration/server/sv__websocket.lua @@ -2,7 +2,18 @@ // WebSocket // -if !file.Exists("bin/gm_gwsockets.dll", "LUA") then +local function websocketDLLExist() + local files, _ = file.Find("lua/bin/*", "GAME") + for k, v in pairs(files) do + if (v:find("gwsockets")) then + return true + end + end + + return false +end + +if !websocketDLLExist 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")