Changed some logging stuff.
This commit is contained in:
parent
bf612b900c
commit
a44dc9851f
@ -100,7 +100,7 @@ end
|
|||||||
local function handleMessage(sender, type, data)
|
local function handleMessage(sender, type, data)
|
||||||
|
|
||||||
if type == LOG then
|
if type == LOG then
|
||||||
print("[" .. sender .. "]: " .. data["log"] .. textutils.serialise(data["content"]))
|
print("[" .. sender .. "]: " .. data["log"] .. (data["content"] and textutils.serialise(data["content"]) or ""))
|
||||||
elseif type == REQUEST then
|
elseif type == REQUEST then
|
||||||
handleRequest(sender, data["request"], data["content"])
|
handleRequest(sender, data["request"], data["content"])
|
||||||
end
|
end
|
||||||
|
@ -84,7 +84,7 @@ local function sendLog(log, ...)
|
|||||||
sender=UNIT,
|
sender=UNIT,
|
||||||
type=LOG,
|
type=LOG,
|
||||||
log=log,
|
log=log,
|
||||||
CONTENT=arg
|
content=arg
|
||||||
}
|
}
|
||||||
modem.transmit(CHANNEL, CHANNEL, textutils.serialise(logData))
|
modem.transmit(CHANNEL, CHANNEL, textutils.serialise(logData))
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user