From 25456e4523c90368c7d52e90b56513c49bdf4017 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sat, 21 Nov 2026 00:15:59 +0300 Subject: [PATCH 1/2] Fix EGP connect errors ``` - [wire] addons/wire/lua/entities/gmod_wire_egp_hud/huddraw.lua:150: attempt to index field 'Users' (a nil value) 1. EGPHudConnect - addons/wire/lua/entities/gmod_wire_egp_hud/huddraw.lua:150 2. unknown - entities/gmod_wire_expression2/core/egpfunctions.lua:1161 ``` --- lua/entities/gmod_wire_expression2/core/egpfunctions.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/entities/gmod_wire_expression2/core/egpfunctions.lua b/lua/entities/gmod_wire_expression2/core/egpfunctions.lua index 25f9142f07..c609daa75f 100644 --- a/lua/entities/gmod_wire_expression2/core/egpfunctions.lua +++ b/lua/entities/gmod_wire_expression2/core/egpfunctions.lua @@ -1158,6 +1158,7 @@ e2function void wirelink:egpHudToggle() antispam[self.player] = CurTime() + 0.1 timer.Simple(0, function() + if not EGP:ValidEGP(this) then return end EGP.EGPHudConnect(this, not (this.Users ~= nil and this.Users[self.player] ~= nil), self.player) end) end @@ -1168,6 +1169,7 @@ e2function void wirelink:egpHudEnable(enable) antispam[self.player] = CurTime() + 0.1 timer.Simple(0, function() + if not EGP:ValidEGP(this) then return end EGP.EGPHudConnect(this, enable ~= 0, self.player) end) end From 6e55ec86e4b1a13ccd1b244a17839370f03e75e6 Mon Sep 17 00:00:00 2001 From: Astralcircle <142503363+Astralcircle@users.noreply.github.com> Date: Sat, 21 Nov 2026 04:42:12 +0300 Subject: [PATCH 2/2] Fix antispam memleak --- lua/entities/gmod_wire_expression2/core/egpfunctions.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/entities/gmod_wire_expression2/core/egpfunctions.lua b/lua/entities/gmod_wire_expression2/core/egpfunctions.lua index c609daa75f..8087fde4ae 100644 --- a/lua/entities/gmod_wire_expression2/core/egpfunctions.lua +++ b/lua/entities/gmod_wire_expression2/core/egpfunctions.lua @@ -1174,6 +1174,10 @@ e2function void wirelink:egpHudEnable(enable) end) end +registerCallback("destruct", function(self) + antispam[self.player] = nil +end) + e2function array wirelink:egpConnectedUsers() if not EGP:ValidEGP(this) then return self:throw("Invalid wirelink!", {}) end if not this.Users then return {} end