From 20ea3b46f4356d9bf14d45bf80f8f47319843323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 15 Dec 2020 15:00:36 +0800 Subject: update telemetry --- script/service/telemetry.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'script') diff --git a/script/service/telemetry.lua b/script/service/telemetry.lua index d04662b9..08c34314 100644 --- a/script/service/telemetry.lua +++ b/script/service/telemetry.lua @@ -12,7 +12,9 @@ if not token then util.saveFile(tokenPath, token) end -local function pushClient(link) +log.info('Telemetry Token:', token) + +local function pushClientInfo(link) nonil.enable() local clientName = client.info.clientInfo.name local clientVersion = client.info.clientInfo.version @@ -30,7 +32,12 @@ timer.wait(5, function () return end local link = net.connect('tcp', '119.45.194.183', 11577) - pushClient(link) - net.update() + pushClientInfo(link) end)() + timer.loop(1, function () + if not config.config.telemetry.enable then + return + end + net.update() + end) end) -- cgit v1.2.3