fix SSL mode did not assign +z after initalizeSocket change
This commit is contained in:
@@ -192,7 +192,7 @@ class WTVIRC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
socket.removeAllListeners();
|
socket.removeAllListeners();
|
||||||
await this.initializeSocket(secureSocket);
|
await this.initializeSocket(secureSocket, true);
|
||||||
|
|
||||||
});
|
});
|
||||||
secureSocket.resume();
|
secureSocket.resume();
|
||||||
@@ -215,7 +215,7 @@ class WTVIRC {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async initializeSocket(socket) {
|
async initializeSocket(socket, secure = false) {
|
||||||
if (this.debug) {
|
if (this.debug) {
|
||||||
// debug output for socket data
|
// debug output for socket data
|
||||||
const originalWrite = socket.write;
|
const originalWrite = socket.write;
|
||||||
@@ -244,7 +244,7 @@ class WTVIRC {
|
|||||||
socket.client_caps = [];
|
socket.client_caps = [];
|
||||||
this.filterHostname(socket, socket.remoteAddress);
|
this.filterHostname(socket, socket.remoteAddress);
|
||||||
socket.timestamp = this.getDate();
|
socket.timestamp = this.getDate();
|
||||||
socket.secure = false;
|
socket.secure = secure;
|
||||||
socket.uniqueId = `${this.serverId}${this.generateUniqueId(socket)}`;
|
socket.uniqueId = `${this.serverId}${this.generateUniqueId(socket)}`;
|
||||||
await this.doInitialHandshake(socket);
|
await this.doInitialHandshake(socket);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user