forked from TeamUlysses/ulib
[FIX] Server errors when loading massive ban lists.
This commit is contained in:
parent
6a85b66b2a
commit
e003c7bf9f
@ -1,6 +1,7 @@
|
||||
# ULib Changelog
|
||||
|
||||
## v2.63 - *(00/00/00)*
|
||||
* [FIX] Server errors when loading massive ban lists.
|
||||
|
||||
## v2.62 - *(03/19/17)*
|
||||
* [ADD] Enhancements from and to CAMI.
|
||||
|
@ -441,11 +441,13 @@ function ULib.refreshBans()
|
||||
end
|
||||
end
|
||||
|
||||
local commandBuffer = ""
|
||||
for k, v in pairs( ULib.bans ) do
|
||||
if type( v ) == "table" and type( k ) == "string" then
|
||||
local time = ( v.unban - os.time() ) / 60
|
||||
if time > 0 then
|
||||
game.ConsoleCommand( string.format( "banid %f %s\n", time, k ) )
|
||||
--game.ConsoleCommand( string.format( "banid %f %s\n", time, k ) )
|
||||
commandBuffer = string.format( "%sbanid %f %s\n", commandBuffer, time, k )
|
||||
elseif math.floor( v.unban ) == 0 then -- We floor it because GM10 has floating point errors that might make it be 0.1e-20 or something dumb.
|
||||
if not ban_set[ k ] then
|
||||
ULib.bans[ k ] = nil
|
||||
@ -458,6 +460,7 @@ function ULib.refreshBans()
|
||||
ULib.bans[ k ] = nil
|
||||
end
|
||||
end
|
||||
ULib.execString( commandBuffer, "InitBans" )
|
||||
|
||||
-- We're queueing this because it will split the load out for VERY large ban files
|
||||
ULib.queueFunctionCall( function() ULib.fileWrite( ULib.BANS_FILE, ULib.makeKeyValues( ULib.bans ) ) end )
|
||||
|
@ -1 +1 @@
|
||||
1489949413
|
||||
1490127377
|
||||
|
Loading…
Reference in New Issue
Block a user