more fixes
This commit is contained in:
@@ -518,9 +518,21 @@ class WTVIRC {
|
|||||||
}
|
}
|
||||||
return mode;
|
return mode;
|
||||||
});
|
});
|
||||||
chan_modes.forEach(m => {
|
if (chan_modes.length > 0) {
|
||||||
socket.write(`:${this.servername} 324 ${socket.nickname} ${channel} ${m}\r\n`);
|
// Batch all modes into a single 324 reply
|
||||||
});
|
const modeString = chan_modes
|
||||||
|
.map(m => {
|
||||||
|
// For modes with parameters (like k <key> or l<limit>)
|
||||||
|
if (typeof m === 'string' && (m.startsWith('k ') || /^l\d+$/.test(m))) {
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
return m;
|
||||||
|
})
|
||||||
|
.join('').replace(/\+/g, '');
|
||||||
|
socket.write(`:${this.servername} 324 ${socket.nickname} ${channel} +${modeString}\r\n`);
|
||||||
|
} else {
|
||||||
|
socket.write(`:${this.servername} 324 ${socket.nickname} ${channel}\r\n`);
|
||||||
|
}
|
||||||
socket.write(`:${this.servername} 329 ${socket.nickname} ${channel} ${this.channeltimestamps.get(channel) || Date.now()}\r\n`);
|
socket.write(`:${this.servername} 329 ${socket.nickname} ${channel} ${this.channeltimestamps.get(channel) || Date.now()}\r\n`);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user