From e9e435eb130eed6e05e3e319bc5376a5a3da095c Mon Sep 17 00:00:00 2001 From: Linventif Date: Tue, 1 Jul 2025 01:13:49 +0000 Subject: [PATCH] feat: implement console live exporter with custom print function --- .../modules/console_live_exporter/sv_main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 lua/gmod_integration/modules/console_live_exporter/sv_main.lua diff --git a/lua/gmod_integration/modules/console_live_exporter/sv_main.lua b/lua/gmod_integration/modules/console_live_exporter/sv_main.lua new file mode 100644 index 0000000..64cecb5 --- /dev/null +++ b/lua/gmod_integration/modules/console_live_exporter/sv_main.lua @@ -0,0 +1,10 @@ +local oldPrint = print +function print(...) + local msg = table.concat({...}, " ") + if gmInte.enableConsoleLiveExporter then + gmInte.websocket:send("console_live_exporter", { + data = msg + }, nil, true) + end + oldPrint(...) +end \ No newline at end of file