diff --git a/queue-backend/src/queue/queue.service.ts b/queue-backend/src/queue/queue.service.ts index 1d676df..0717771 100644 --- a/queue-backend/src/queue/queue.service.ts +++ b/queue-backend/src/queue/queue.service.ts @@ -12,6 +12,7 @@ import { Interval } from '@nestjs/schedule' import { queuedServerList } from '../config/server-config' import { PassService } from '../pass/pass.service' import { UserDto } from '../auth/dto/user.dto'; +import { isStaff } from '../common/utils'; @@ -32,8 +33,18 @@ export class QueueService { private readonly logger = new Logger(QueueService.name); - async addToQueue(serverPort: string, { ckey, donatorTier }: UserDto): Promise { + async addToQueue(serverPort: string, { ckey, donatorTier, adminFlags, whitelistPasses }: UserDto): Promise { if (await this.passService.checkPass(ckey, serverPort)) return false + + if (isStaff(adminFlags)) { + if (serverPort === '7722' && whitelistPasses?.includes(parseInt(serverPort))) { + await this.playerListService.addFromQueue(serverPort, ckey) + return true + } else if (serverPort !== '7722') { + await this.playerListService.addFromQueue(serverPort, ckey) + return true + } + } if (donatorTier >= 2) { await this.playerListService.addFromQueue(serverPort, ckey) diff --git a/queue-backend/src/status-events/status-events.service.ts b/queue-backend/src/status-events/status-events.service.ts index 3de9f27..4cb4490 100644 --- a/queue-backend/src/status-events/status-events.service.ts +++ b/queue-backend/src/status-events/status-events.service.ts @@ -110,9 +110,9 @@ export class StatusEventsService { async onClientConnect({ckey, adminFlags}: UserDto, ip: string) { await this.ipLinkService.linkIp(ckey, ip) - if (isStaff(adminFlags)) { - this.passService.addPassesForCkey(ckey) - } + // if (isStaff(adminFlags)) { + // this.passService.addPassesForCkey(ckey) + // } if (!this.clientConnections[ckey]) { this.clientConnections[ckey] = new ClientConnectionCounter( diff --git a/queue-frontend/package.json b/queue-frontend/package.json index c174b61..28fe167 100644 --- a/queue-frontend/package.json +++ b/queue-frontend/package.json @@ -34,4 +34,4 @@ "typescript": "4.5.4" }, "packageManager": "yarn@3.1.1" -} \ No newline at end of file +}