socket dim / clock issue

This commit is contained in:
kepler155c@gmail.com 2018-11-29 15:12:25 -05:00
parent eb799004f8
commit 880a81f655
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ local function trusted(msg, port)
local data = Crypto.decrypt(msg.t or '', pubKey)
--local sharedKey = modexp(pubKey, exchange.secretKey, public.primeMod)
return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 10
return data.ts and tonumber(data.ts) and math.abs(os.time() - data.ts) < 24
end
end

View File

@ -1,9 +1,9 @@
local peripheral = _G.peripheral
local speaker = peripheral.find('speaker')
local Sound = { }
function Sound.play(sound, vol)
local speaker = peripheral.find('speaker')
if speaker then
speaker.playSound('minecraft:' .. sound, vol or 1)
end