Skip to content

Commit

Permalink
Fix Server error in some cases when sorting bans by Unban Date after …
Browse files Browse the repository at this point in the history
…a new ban has been added.

Fixes #517.
  • Loading branch information
SticklyMan committed Nov 7, 2015
1 parent 33efffa commit 73abcc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/ulx/xgui/server/sv_bans.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function bans.init()
-- Bans by Unban Date
if next( xgui.bansbyunban ) == nil then
for k, v in pairs( ULib.bans ) do
table.insert( xgui.bansbyunban, { k, v.unban or 0 } )
table.insert( xgui.bansbyunban, { k, tonumber(v.unban) or 0 } )
end
table.sort( xgui.bansbyunban, function( a, b ) return a[2] < b[2] end )
end
Expand Down Expand Up @@ -206,7 +206,7 @@ function bans.init()
local steamID = sortTable[i][1]
local bandata = ULib.bans[steamID]

-- Handle filters. This is confusing, but essentially 0 means skip check, 1 means restrict if condition IS true, 2+ means restrict if condition IS NOT true.
-- Handle filters. This is confusing, but essentially 0 means skip check, 1 means restrict if condition IS true, 2+ means restrict if condition IS NOT true.
if not ( filterPermaBan > 0 and ( ( tonumber( bandata.unban ) == 0 ) == ( filterPermaBan == 1 ) ) ) then
if not ( filterIncomplete > 0 and ( ( bandata.time == nil ) == ( filterIncomplete == 1 ) ) ) then

Expand Down
1 change: 1 addition & 0 deletions ulx_readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ v3.70 - *(00/00/00)*
* [FIX] Minor issue where opposite commands might not be run due to case sensitivity.
* [FIX] Duplicate help entries due to autorefresh and overriding commands. (Thanks iSnipeu).
* [FIX] Ragdolled players were getting removed on map cleanup.
* [FIX] XGUI: Server error in some cases when sorting bans by Unban Date after a new ban has been added.
* [CHANGE] MOTD now uses DHTML (Awesomium framework).
* [CHANGE] Hook calls to match ULib's new format.
* [CHANGE] ULX convar updates will now append an entry to data/config.txt if it is not defined in the file. Previously, these changes would not be saved.
Expand Down

0 comments on commit 73abcc1

Please sign in to comment.