🔒 Skip unauthenticated sockets in admin broadcasts

Any connection that had not finished logging in has no account, and
dereferencing it aborted the broadcast for all remaining admins.
This commit is contained in:
2026-11-15 22:08:32 +01:00
parent 46aaec645c
commit 464c170e2d
+2 -1
View File
@@ -98,7 +98,8 @@ begin
while CEDServerInstance.TCPServer.IterNext do while CEDServerInstance.TCPServer.IterNext do
begin begin
netState := TNetState(CEDServerInstance.TCPServer.Iterator.UserData); netState := TNetState(CEDServerInstance.TCPServer.Iterator.UserData);
if (netState <> nil) and (netState.Account.AccessLevel >= AAccessLevel) then if (netState <> nil) and (netState.Account <> nil) and
(netState.Account.AccessLevel >= AAccessLevel) then
CEDServerInstance.SendPacket(netState, APacket, False); CEDServerInstance.SendPacket(netState, APacket, False);
end; end;
APacket.Free; APacket.Free;