1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-24 03:08:05 +11:00
Zorya-NEO/lib/net_minitel/microtel/microtel-5-core-mini.lua

28 lines
405 B
Lua
Raw Normal View History

2020-01-09 15:01:35 +11:00
function net.socket(A,P,S)
local C,rb={},""
C.s,C.b,C.P,C.A="o","",tonumber(P),A
function C.r(self,l)
rb=self.buffer:sub(1,l)
self.buffer=self.buffer:sub(l+1)
return rb
end
function C.w(self,D)
net.lsend(self.A,self.P,D)
end
function C.c(s)
net.send(C.A,C.P,S)
end
function h(E,F,P,D)
if F==C.A and P==C.P then
if D==S then
net.hook[S]=nil
C.s="c"
return
end
C.b=C.b..D
end
end
net.hook[S]=h
return C
end