From c945736ae16701d7c02a7c844f56337ca5bfac9a Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Wed, 24 May 2017 22:36:47 +0000 Subject: [PATCH] some general optomisations --- modules/applications/nshd.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/applications/nshd.lua b/modules/applications/nshd.lua index f6a13ae..2e58b6f 100644 --- a/modules/applications/nshd.lua +++ b/modules/applications/nshd.lua @@ -1,12 +1,12 @@ function nshd_w(evPP,cA,sI) -s("netsh daemon - "..tostring(sI),function() print(pcall(function() +s("netsh daemon - "..tostring(sI),function() while true do if ev[1] == "net_msg" then local msg=tostring(ev[4]) if ev[3] == evPP and ev[2] == cA then if msg:sub(1,3) == "key" then h("key",tT[cT][3].sI,tonumber(msg:sub(4)),0) - elseif msg == "exit" then break + elseif msg == "exit" then pcall(killsession,sI) break end end elseif ev[1] == "display" and ev[3] == tT[cT][3].sI then @@ -14,11 +14,11 @@ s("netsh daemon - "..tostring(sI),function() print(pcall(function() end C.yield() end -end)) end,{["sI"]=sI}) +end,{["sI"]=sI}) end function nshd(P) - s("nshd",function() print(pcall(function() + s("nshd",function() local Cc=1 while true do if ev[1] == "net_msg" and ev[3] == P then @@ -32,6 +32,6 @@ function nshd(P) end end C.yield() - end end)) + end end,{["sI"]="log"}) end