mirror of
https://github.com/corvax-team/ss14-wl.git
synced 2026-02-15 03:31:38 +01:00
Fix admin queue bypass
This commit is contained in:
@@ -236,11 +236,13 @@ namespace Content.Server.Connection
|
||||
// Corvax-Queue-Start: Make these conditions in one place, for checks in the connection and in the queue
|
||||
public async Task<bool> HavePrivilegedJoin(NetUserId userId)
|
||||
{
|
||||
var isAdmin = await _dbManager.GetAdminDataForAsync(userId) != null;
|
||||
var havePriorityJoin = _sponsorsMgr != null && _sponsorsMgr.HavePriorityJoin(userId); // Corvax-Sponsors
|
||||
var wasInGame = EntitySystem.TryGet<GameTicker>(out var ticker) &&
|
||||
ticker.PlayerGameStatuses.TryGetValue(userId, out var status) &&
|
||||
status == PlayerGameStatus.JoinedGame;
|
||||
return havePriorityJoin || // Corvax-Sponsors
|
||||
return isAdmin ||
|
||||
havePriorityJoin || // Corvax-Sponsors
|
||||
wasInGame;
|
||||
}
|
||||
// Corvax-Queue-End
|
||||
|
||||
Reference in New Issue
Block a user