From df1e8dde13ac7da2bb6b2e8a0e52d16ab1b39f7c Mon Sep 17 00:00:00 2001 From: erius0 <63460770+erius0@users.noreply.github.com> Date: Fri, 8 Jan 2021 04:44:49 +0300 Subject: [PATCH] Update linkedGet.lua --- linkedGet.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linkedGet.lua b/linkedGet.lua index 4ee85ac..b5e1d35 100644 --- a/linkedGet.lua +++ b/linkedGet.lua @@ -4,8 +4,8 @@ local component = require("component") local fs = require("filesystem") local tunnel = component.tunnel -local success = "команда выполнена успешно" -local fail = "неизвестная команда - пиши help" +local success = "console: команда выполнена успешно" +local fail = "console: неизвестная команда - пиши help" function os.dateRL(format) if not fs.get("/").isReadOnly() then @@ -41,10 +41,11 @@ end while true do local _, _, from, _, _, message = event.pull("modem_message") - local log = "["..os.dateRL("%x %X").."]".." "..getUser(tostring(from))..": "..message.."\n"..handleMessage(tostring(message)) + local answer = handleMessage(tostring(message) + local log = "["..os.dateRL("%x %X").."] "..getUser(tostring(from))..": "..message.."\n".."["..os.dateRL("%x %X").."] "..answer) print(log) local f = io.open("logs.txt", "a") f:write(log.."\n") f:close() - tunnel.send("succes!") + tunnel.send(answer) end