allow halfops to set topic

This commit is contained in:
zefie
2025-06-16 16:21:05 -04:00
parent 007b92c382
commit c57bb353c4

View File

@@ -1097,7 +1097,7 @@ class WTVIRC {
chan_modes = this.channelmodes.get(channel) || []; chan_modes = this.channelmodes.get(channel) || [];
if (chan_modes.includes('t')) { if (chan_modes.includes('t')) {
// Only allow channel operators to change the topic if +t is set // Only allow channel operators to change the topic if +t is set
if (!this.channelops.has(channel) || !this.channelops.get(channel).has(socket.nickname)) { if (!this.channelops.has(channel) || !this.channelops.get(channel).has(socket.nickname) || !this.channelhalfops.has(channel) || !this.channelhalfops.get(channel).has(socket.nickname)) {
socket.write(`:${this.servername} 482 ${socket.nickname} ${channel} :You're not channel operator\r\n`); socket.write(`:${this.servername} 482 ${socket.nickname} ${channel} :You're not channel operator\r\n`);
break; break;
} }