forked from TeamUlysses/ulx
XGUI: =Fixed: Hard crash with the os.date function when bans have an extremely long unban time.
--Stickly Man!
This commit is contained in:
parent
2874aa7ac3
commit
ece506c837
4
info.txt
4
info.txt
@ -1,8 +1,8 @@
|
||||
"AddonInfo"
|
||||
{
|
||||
"name" "ULX"
|
||||
"version" "3.53"
|
||||
"up_date" "01/01/12"
|
||||
"version" "3.54"
|
||||
"up_date" "04/27/12"
|
||||
"author_name" "Team Ulysses"
|
||||
"author_email" "teamulysses@ulyssesmod.net"
|
||||
"author_url" "http://www.ulyssesmod.net/"
|
||||
|
@ -87,7 +87,7 @@ local function xgui_init( authedply )
|
||||
draw.RoundedBoxEx( 4, 0, 1, 580, 20, xgui.settings.infoColor, false, false, true, true )
|
||||
end
|
||||
local version_type = ulx.revision and ( ulx.revision > 0 and " SVN " .. ulx.revision or " Release") or (" N/A")
|
||||
xlib.makelabel{ x=5, y=-10, label="\nULX Admin Mod :: XGUI - by Stickly Man! :: v11.9.21 | ULX v" .. ulx.version .. version_type .. " | ULib v" .. ULib.VERSION, textcolor=color_black, parent=xgui.infobar }:NoClipping( true )
|
||||
xlib.makelabel{ x=5, y=-10, label="\nULX Admin Mod :: XGUI - by Stickly Man! :: v12.4.27 | ULX v" .. ulx.version .. version_type .. " | ULib v" .. ULib.VERSION, textcolor=color_black, parent=xgui.infobar }:NoClipping( true )
|
||||
xgui.thetime = xlib.makelabel{ x=515, y=-10, label="", textcolor=color_black, parent=xgui.infobar }
|
||||
xgui.thetime:NoClipping( true )
|
||||
xgui.thetime.check = function()
|
||||
|
@ -138,20 +138,20 @@ function xbans.ShowBanDetailsWindow( ID )
|
||||
xlib.makelabel{ x=36, y=50, label="SteamID:", parent=panel }
|
||||
xlib.makelabel{ x=90, y=50, label=ID, parent=panel }
|
||||
xlib.makelabel{ x=33, y=70, label="Ban Date:", parent=panel }
|
||||
if xgui.data.bans[ID].time then xlib.makelabel{ x=90, y=70, label=os.date( "%b %d, %Y - %I:%M:%S %p", xgui.data.bans[ID].time ), parent=panel } end
|
||||
if xgui.data.bans[ID].time then xlib.makelabel{ x=90, y=70, label=os.date( "%b %d, %Y - %I:%M:%S %p", tonumber( xgui.data.bans[ID].time ) ), parent=panel } end
|
||||
xlib.makelabel{ x=20, y=90, label="Unban Date:", parent=panel }
|
||||
xlib.makelabel{ x=90, y=90, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "Never" or os.date( "%b %d, %Y - %I:%M:%S %p", xgui.data.bans[ID].unban ) ), parent=panel }
|
||||
xlib.makelabel{ x=90, y=90, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "Never" or os.date( "%b %d, %Y - %I:%M:%S %p", math.min( tonumber( xgui.data.bans[ID].unban ), 4294967295 ) ) ), parent=panel }
|
||||
xlib.makelabel{ x=10, y=110, label="Length of Ban:", parent=panel }
|
||||
xlib.makelabel{ x=90, y=110, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "Permanent" or xgui.ConvertTime( xgui.data.bans[ID].unban - xgui.data.bans[ID].time ) ), parent=panel }
|
||||
xlib.makelabel{ x=90, y=110, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "Permanent" or xgui.ConvertTime( tonumber( xgui.data.bans[ID].unban ) - xgui.data.bans[ID].time ) ), parent=panel }
|
||||
xlib.makelabel{ x=33, y=130, label="Time Left:", parent=panel }
|
||||
local timeleft = xlib.makelabel{ x=90, y=130, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "N/A" or xgui.ConvertTime( xgui.data.bans[ID].unban - os.time() ) ), parent=panel }
|
||||
local timeleft = xlib.makelabel{ x=90, y=130, label=( tonumber( xgui.data.bans[ID].unban ) == 0 and "N/A" or xgui.ConvertTime( tonumber( xgui.data.bans[ID].unban ) - os.time() ) ), parent=panel }
|
||||
xlib.makelabel{ x=26, y=150, label="Banned By:", parent=panel }
|
||||
if xgui.data.bans[ID].admin then xlib.makelabel{ x=90, y=150, label=string.gsub( xgui.data.bans[ID].admin, "%(STEAM_%w:%w:%w*%)", "" ), parent=panel } end
|
||||
if xgui.data.bans[ID].admin then xlib.makelabel{ x=90, y=165, label=string.match( xgui.data.bans[ID].admin, "%(STEAM_%w:%w:%w*%)" ), parent=panel } end
|
||||
xlib.makelabel{ x=41, y=185, label="Reason:", parent=panel }
|
||||
xlib.makelabel{ x=90, y=185, w=190, label=xgui.data.bans[ID].reason, parent=panel, tooltip=xgui.data.bans[ID].reason ~= "" and xgui.data.bans[ID].reason or nil }
|
||||
xlib.makelabel{ x=13, y=205, label="Last Updated:", parent=panel }
|
||||
xlib.makelabel{ x=90, y=205, label=( ( xgui.data.bans[ID].modified_time == nil ) and "Never" or os.date( "%b %d, %Y - %I:%M:%S %p", xgui.data.bans[ID].modified_time ) ), parent=panel }
|
||||
xlib.makelabel{ x=90, y=205, label=( ( xgui.data.bans[ID].modified_time == nil ) and "Never" or os.date( "%b %d, %Y - %I:%M:%S %p", tonumber( xgui.data.bans[ID].modified_time ) ) ), parent=panel }
|
||||
xlib.makelabel{ x=21, y=225, label="Updated by:", parent=panel }
|
||||
if xgui.data.bans[ID].modified_admin then xlib.makelabel{ x=90, y=225, label=string.gsub( xgui.data.bans[ID].modified_admin, "%(STEAM_%w:%w:%w*%)", "" ), parent=panel } end
|
||||
if xgui.data.bans[ID].modified_admin then xlib.makelabel{ x=90, y=240, label=string.match( xgui.data.bans[ID].modified_admin, "%(STEAM_%w:%w:%w*%)" ), parent=panel } end
|
||||
@ -181,7 +181,7 @@ function xbans.ShowBanDetailsWindow( ID )
|
||||
panel:Remove()
|
||||
return
|
||||
end
|
||||
local bantime = xgui.data.bans[ID].unban - os.time()
|
||||
local bantime = tonumber( xgui.data.bans[ID].unban ) - os.time()
|
||||
if bantime <= 0 then
|
||||
timeleft:SetText( xgui.ConvertTime( 0 ) .. " (Waiting for server)" )
|
||||
else
|
||||
@ -376,7 +376,7 @@ end
|
||||
function xbans.addbanline( baninfo, steamID )
|
||||
xbans.banlist:AddLine( baninfo.name or steamID,
|
||||
( baninfo.admin ) and string.gsub( baninfo.admin, "%(STEAM_%w:%w:%w*%)", "" ) or "",
|
||||
(( tonumber( baninfo.unban ) ~= 0 ) and os.date( "%c", baninfo.unban )) or "Never",
|
||||
(( tonumber( baninfo.unban ) ~= 0 ) and os.date( "%c", math.min( tonumber( baninfo.unban ), 4294967295 ) )) or "Never",
|
||||
baninfo.reason,
|
||||
steamID,
|
||||
tonumber( baninfo.unban ) )
|
||||
@ -411,7 +411,7 @@ function xbans.banUpdated( bantable )
|
||||
found = true
|
||||
v:SetColumnText( 1, data.name or SteamID )
|
||||
v:SetColumnText( 2, data.admin and string.gsub( data.admin, "%(STEAM_%w:%w:%w*%)", "" ) or "" )
|
||||
v:SetColumnText( 3, (( tonumber( data.unban ) ~= 0 ) and os.date( "%c", data.unban )) or "Never" )
|
||||
v:SetColumnText( 3, (( tonumber( data.unban ) ~= 0 ) and os.date( "%c", math.min( tonumber( data.unban ), 4294967295 ) )) or "Never" )
|
||||
v:SetColumnText( 4, data.reason )
|
||||
v:SetColumnText( 5, SteamID )
|
||||
v:SetColumnText( 6, tonumber( data.unban ) )
|
||||
|
@ -1,9 +1,9 @@
|
||||
Title: ULX Readme
|
||||
|
||||
__ULX__
|
||||
Version 3.53
|
||||
Version 3.54
|
||||
|
||||
*ULX v3.53 (released 01/01/12)*
|
||||
*ULX v3.54 (released 04/27/12)*
|
||||
|
||||
ULX is an admin mod for GMod (<http://garrysmod.com/>).
|
||||
|
||||
@ -62,6 +62,9 @@ also access the menu by saying "!menu".__
|
||||
Check out the configs folder in ulx for some more goodies.
|
||||
|
||||
Group: Changelog
|
||||
v3.54 - *(04/27/12)*
|
||||
* [FIX] XGUI: Hard crash with the os.date function when bans have an extremely long unban time.
|
||||
|
||||
v3.53 - *(01/01/12)*
|
||||
* [FIX] Garry breakages.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user