File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -754,21 +754,20 @@ MSync.modules[info.ModuleIdentifier].net = function()
754754 ]]
755755 util .AddNetworkString (" msync." .. info .ModuleIdentifier .. " .openBanGUI" )
756756 MSync .modules [info .ModuleIdentifier ].openBanGUI = function (ply )
757- local tableLength = # MSync .modules [info .ModuleIdentifier ].recentDisconnects
757+ local tableLength = table . Count ( MSync .modules [info .ModuleIdentifier ].recentDisconnects )
758758 local disconnectTable = {}
759759
760- if not tableLength == 0 then
761- for i = 0 , 9 , 1 do
762- if MSync .modules [info .ModuleIdentifier ].recentDisconnects [tableLength - i ] then
763- disconnectTable [i ] = MSync .modules [info .ModuleIdentifier ].recentDisconnects [tableLength - i ]
764- else
765- break
760+ if tableLength > 0 then
761+ local runs = 0
762+ for k ,v in pairs (MSync .modules [info .ModuleIdentifier ].recentDisconnects ) do
763+ if runs > (tableLength - 10 ) then
764+ disconnectTable [k ] = v
766765 end
766+ runs = runs + 1
767767 end
768768 else
769769 disconnectTable = {}
770770 end
771-
772771 net .Start (" msync." .. info .ModuleIdentifier .. " .openBanGUI" )
773772 net .WriteTable (disconnectTable )
774773 net .Send (ply )
You can’t perform that action at this time.
0 commit comments