Skip to content

Commit

Permalink
Fix problem with multiple bans being created
Browse files Browse the repository at this point in the history
  • Loading branch information
ibot3 committed Dec 22, 2023
1 parent 6acbada commit 1821968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Disable strict group sync by default
- Prevent rare situation where one ban creates multiple VyHub bans
4 changes: 4 additions & 0 deletions lua/vyhub/server/sv_ban.lua
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ function VyHub.Ban:handle_queue()
end

VyHub.API:post(url, nil, data, function(code, result)
if not VyHub.Ban.ban_queue[steamid] then
VyHub.Ban.ban_queue[steamid] = {}
end

VyHub.Ban.ban_queue[steamid][i] = nil
VyHub.Ban:save_queues()
VyHub.Ban:refresh()
Expand Down

0 comments on commit 1821968

Please sign in to comment.