From 970926efb6c3437fd4f59d42eaff03521ecf8887 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 19 Dec 2019 17:20:04 +1100 Subject: [PATCH] made the vtunnel bridge not repeat packets to the connection that sent them --- vTunnel/bridge.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vTunnel/bridge.lua b/vTunnel/bridge.lua index 9424fb9..0264473 100644 --- a/vTunnel/bridge.lua +++ b/vTunnel/bridge.lua @@ -96,8 +96,10 @@ function pushLoop() for id,msg in pairs(messages) do if msg[1]:len() > 3 then for k,client in pairs(clients) do - client.conn:send(msg[1]) - reprint("Message #"..tostring(id).." (Client #"..tostring(msg[2]).." -> Client #"..tostring(k).." - "..msg[1]) + if k ~= msg[2] then + client.conn:send(msg[1]) + reprint("Message #"..tostring(id).." (Client #"..tostring(msg[2]).." -> Client #"..tostring(k)..") - "..msg[1]) + end end end messages[id] = nil