fix SSL mode did not assign +z after initalizeSocket change

This commit is contained in:
zefie
2025-06-19 12:32:23 -04:00
parent e1a2bdd8b9
commit 7787d8217d

View File

@@ -192,7 +192,7 @@ class WTVIRC {
}
socket.removeAllListeners();
await this.initializeSocket(secureSocket);
await this.initializeSocket(secureSocket, true);
});
secureSocket.resume();
@@ -215,7 +215,7 @@ class WTVIRC {
});
}
async initializeSocket(socket) {
async initializeSocket(socket, secure = false) {
if (this.debug) {
// debug output for socket data
const originalWrite = socket.write;
@@ -244,7 +244,7 @@ class WTVIRC {
socket.client_caps = [];
this.filterHostname(socket, socket.remoteAddress);
socket.timestamp = this.getDate();
socket.secure = false;
socket.secure = secure;
socket.uniqueId = `${this.serverId}${this.generateUniqueId(socket)}`;
await this.doInitialHandshake(socket);