only let ssl user set ssl only
This commit is contained in:
@@ -122,9 +122,6 @@ class WTVIRC {
|
|||||||
socket.push(firstChunk);
|
socket.push(firstChunk);
|
||||||
|
|
||||||
secureSocket.on('error', (err) => {
|
secureSocket.on('error', (err) => {
|
||||||
if (this.debug) {
|
|
||||||
console.error('TLS error:', err);
|
|
||||||
}
|
|
||||||
this.terminateSession(secureSocket, true);
|
this.terminateSession(secureSocket, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1863,6 +1860,10 @@ class WTVIRC {
|
|||||||
if (!chan_modes || chan_modes === true) {
|
if (!chan_modes || chan_modes === true) {
|
||||||
chan_modes = [];
|
chan_modes = [];
|
||||||
}
|
}
|
||||||
|
if (!socket.secure) {
|
||||||
|
socket.write(`:${this.servername} 484 ${nickname} ${channel} :You must be connected via SSL/TLS to set +z\r\n`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.channelmodes.set(channel, [...chan_modes, 'z']);
|
this.channelmodes.set(channel, [...chan_modes, 'z']);
|
||||||
if (this.kick_insecure_on_z) {
|
if (this.kick_insecure_on_z) {
|
||||||
const usersInChannel = this.channels.get(channel) || new Set();
|
const usersInChannel = this.channels.get(channel) || new Set();
|
||||||
|
|||||||
Reference in New Issue
Block a user