Skip to content

Commit

Permalink
Fix problem with sadmin bans
Browse files Browse the repository at this point in the history
  • Loading branch information
ibot3 committed Jan 5, 2025
1 parent f325a30 commit a86e964
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Improve error messages for API
- Use [CHTTP Library](https://github.com/timschumi/gmod-chttp) if available
- Fix problem with some sAdmin bans
10 changes: 6 additions & 4 deletions lua/vyhub/server/sv_ban.lua
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,12 @@ function VyHub.Ban:handle_queue()
end

function VyHub.Ban:create(steamid, length, reason, creator_steamid)
length = tonumber(length)
if length != nil then
length = tonumber(length)

if length == 0 or length >= 10000000 then
length = nil
if length == 0 or length >= 10000000 then
length = nil
end
end

local data = {
Expand Down Expand Up @@ -954,7 +956,7 @@ function VyHub.Ban.override_admin_mods()
local steamid64_admin = (isentity(admin) and IsValid(admin)) and admin:SteamID64() or admin

if expire <= 0 then
expire = nil
expire = 0
end

if steamid64_admin then
Expand Down

0 comments on commit a86e964

Please sign in to comment.