mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-15 06:48:05 +11:00
Fix: responce was interpritated as function call
This commit is contained in:
parent
f8903ad587
commit
13e18f3451
@ -62,6 +62,9 @@ function rpc.register(name,fn)
|
|||||||
event.listen("net_msg",function(_, from, port, data)
|
event.listen("net_msg",function(_, from, port, data)
|
||||||
if port == rpc.port then
|
if port == rpc.port then
|
||||||
local rpcrq = serial.unserialize(data)
|
local rpcrq = serial.unserialize(data)
|
||||||
|
if #rpcrq ~= 3 then
|
||||||
|
return
|
||||||
|
end
|
||||||
local rpcn, rpcid = table.remove(rpcrq,1), table.remove(rpcrq,1)
|
local rpcn, rpcid = table.remove(rpcrq,1), table.remove(rpcrq,1)
|
||||||
if rpcf[rpcn] and isPermitted(from,rpcn) then
|
if rpcf[rpcn] and isPermitted(from,rpcn) then
|
||||||
local rt = {pcall(rpcf[rpcn],table.unpack(rpcrq))}
|
local rt = {pcall(rpcf[rpcn],table.unpack(rpcrq))}
|
||||||
|
Loading…
Reference in New Issue
Block a user