From 2da090371de41c27f6006bc6fad75e400ce51859 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Mon, 26 Jun 2017 12:11:40 +0000 Subject: [PATCH] actually moved them now --- modules/applications/nshc-auth.lua | 34 -------------------------- modules/applications/nshc.lua | 32 ------------------------- modules/applications/nshd-auth.lua | 38 ------------------------------ modules/applications/nshd.lua | 37 ----------------------------- 4 files changed, 141 deletions(-) delete mode 100644 modules/applications/nshc-auth.lua delete mode 100644 modules/applications/nshc.lua delete mode 100644 modules/applications/nshd-auth.lua delete mode 100644 modules/applications/nshd.lua diff --git a/modules/applications/nshc-auth.lua b/modules/applications/nshc-auth.lua deleted file mode 100644 index ad8f554..0000000 --- a/modules/applications/nshc-auth.lua +++ /dev/null @@ -1,34 +0,0 @@ -function nshcs_w(evPP,nid,pW) - local sI = E().sI or 1 - chauthc(nid,evPP,pW) - while true do - if ev[1] == "net_msg" then - local V,msg=false,tostring(ev[4]) - if ev[3] == evPP and ev[2] == nid then - if msg:sub(1,3) == "dis" then - write(msg:sub(4)) - end - end - elseif ev[1] == "key" and ev[2] == sI and ev[3] == 29 and ev[4] == 27 then - break - elseif ev[1] == "key" and ev[2] == sI then - ns(nid,evPP,"key"..tostring(ev[3])) - end - C.yield() - end - ns(nid,evPP,"exit") -end - -function nshcs(P,nid,pW) - pW=(pW or readln("*")) - ns(nid,P,"initnsh") - while true do - if ev[1] == "net_msg" and ev[2] == nid and ev[3] == P then - break - elseif ev[1] == "key" and ev[2] == sI and ev[3] == 29 and ev[4] == 27 then - break - end - C.yield() - end - nshcs_w(ev[4],nid,pW) -end diff --git a/modules/applications/nshc.lua b/modules/applications/nshc.lua deleted file mode 100644 index 95ac96b..0000000 --- a/modules/applications/nshc.lua +++ /dev/null @@ -1,32 +0,0 @@ -function nshc_w(evPP,nid) - local sI = E().sI or 1 - while true do - if ev[1] == "net_msg" then - local V,msg=false,tostring(ev[4]) - if ev[3] == evPP and ev[2] == nid then - if msg:sub(1,3) == "dis" then - write(msg:sub(4)) - end - end - elseif ev[1] == "key" and ev[2] == sI and ev[3] == 29 and ev[4] == 27 then - break - elseif ev[1] == "key" and ev[2] == sI then - ns(nid,evPP,"key"..tostring(ev[3])) - end - C.yield() - end - ns(nid,evPP,"exit") -end - -function nshc(P,nid) - ns(nid,P,"initnsh") - while true do - if ev[1] == "net_msg" and ev[2] == nid and ev[3] == P then - break - elseif ev[1] == "key" and ev[2] == sI and ev[3] == 29 and ev[4] == 27 then - break - end - C.yield() - end - nshc_w(ev[4],nid) -end diff --git a/modules/applications/nshd-auth.lua b/modules/applications/nshd-auth.lua deleted file mode 100644 index ce52385..0000000 --- a/modules/applications/nshd-auth.lua +++ /dev/null @@ -1,38 +0,0 @@ -function nshds_w(evPP,cA,sI,pW) -s("nshds - "..tostring(sI),function() - chauths(cA,evPP,pW) - luash({["sI"]=sI}) - 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 pcall(killsession,sI) break - end - end - elseif ev[1] == "display" and ev[3] == tT[cT][3].sI then - ns(cA,evPP,"dis"..tostring(ev[2])) - end - C.yield() - end -end,{["sI"]=sI}) -end - -function nshds(P,pW) - s("nshds",function() - local Cc=1 - while true do - if ev[1] == "net_msg" and ev[3] == P then - if ev[4] == "initnsh" then - nnID="nsh-"..tostring(Cc) - Cc=Cc+1 - ns(ev[2],P,nnID) - nshds_w(nnID,ev[2],nnID,pW) - print("[nshds]Spawned "..nnID.." for "..tostring(ev[2])) - end - end - C.yield() - end - end,{["sI"]="log"}) -end diff --git a/modules/applications/nshd.lua b/modules/applications/nshd.lua deleted file mode 100644 index 0206c85..0000000 --- a/modules/applications/nshd.lua +++ /dev/null @@ -1,37 +0,0 @@ -function nshd_w(evPP,cA,sI) -s("nshd - "..tostring(sI),function() - luash({["sI"]=sI}) - 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 pcall(killsession,sI) break - end - end - elseif ev[1] == "display" and ev[3] == tT[cT][3].sI then - ns(cA,evPP,"dis"..tostring(ev[2])) - end - C.yield() - end -end,{["sI"]=sI}) -end - -function nshd(P) - s("nshd",function() - local Cc=1 - while true do - if ev[1] == "net_msg" and ev[3] == P then - if ev[4] == "initnsh" then - nnID="nsh-"..tostring(Cc) - Cc=Cc+1 - ns(ev[2],P,nnID) - nshd_w(nnID,ev[2],nnID) - print("[nshd]Spawned "..nnID.." for "..tostring(ev[2])) - end - end - C.yield() - end - end,{["sI"]="log"}) -end