From eecfe9665d1ebfaa444cd45bd73ad14df88bec35 Mon Sep 17 00:00:00 2001 From: Jason Preston Date: Sun, 9 Aug 2026 00:16:48 -0600 Subject: [PATCH] fix: correct irc-framework import to use named Client export --- server/src/irc/connection-manager.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/src/irc/connection-manager.ts b/server/src/irc/connection-manager.ts index 4866681..00fe466 100644 --- a/server/src/irc/connection-manager.ts +++ b/server/src/irc/connection-manager.ts @@ -1,4 +1,4 @@ -import IrcFramework from 'irc-framework'; +import { Client as IrcClient } from 'irc-framework'; import { db } from '../db/index.js'; import { connections, channels } from '../db/schema.js'; import { eq, and } from 'drizzle-orm'; @@ -41,7 +41,7 @@ const BASE_RECONNECT_DELAY = 1000; class ConnectionManager { private static instance: ConnectionManager; - private userConnections: Map> = new Map(); + private userConnections: Map> = new Map(); private reconnectState: Map = new Map(); private shutdownRequested = false; @@ -75,13 +75,13 @@ class ConnectionManager { } } - async connect(userId: number, connConfig: ConnectionConfig): Promise { + async connect(userId: number, connConfig: ConnectionConfig): Promise { const existing = this.getConnection(userId, connConfig.id); if (existing) { return existing; } - const client = new IrcFramework.Client(); + const client = new IrcClient(); const connectOptions: Record = { host: connConfig.hostname, @@ -227,13 +227,13 @@ class ConnectionManager { } } - getConnection(userId: number, connectionId: number): IrcFramework.Client | undefined { + getConnection(userId: number, connectionId: number): IrcClient | undefined { const userMap = this.userConnections.get(userId); if (!userMap) return undefined; return userMap.get(connectionId); } - getUserConnections(userId: number): Map { + getUserConnections(userId: number): Map { return this.userConnections.get(userId) || new Map(); }