mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-25 09:08:34 +01:00
fix chat and payments and add spectator mode
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* Handles game queue operations, validation, and queue management
|
||||
*/
|
||||
|
||||
const { normalizeError } = require('../utils/errors');
|
||||
|
||||
class QueueHandler {
|
||||
constructor({ queueManager, gameModeManager, paymentHandlers, activeGames, broadcastManager, debugManager, rateLimiter }) {
|
||||
this.queueManager = queueManager;
|
||||
@@ -87,8 +89,9 @@ class QueueHandler {
|
||||
console.log(`🕒 QUEUE ENTRY: Player ${socket.id} queued for block ${nextBlock}. Queue length: ${this.queueManager.getQueueLength()}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('handleGameQueue error:', error);
|
||||
this.broadcastManager.sendStatusUpdate(socket.id, 'error', 'Failed to join queue. Please try again.');
|
||||
const normalized = normalizeError(error, 'Failed to join queue');
|
||||
console.error('handleGameQueue error:', normalized.message);
|
||||
this.broadcastManager.sendStatusUpdate(socket.id, 'error', normalized.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user