dont send 332 if there is no channel topic
This commit is contained in:
@@ -2097,17 +2097,9 @@ class WTVIRC {
|
|||||||
this.broadcastToAllServers(`:${this.serverId} SJOIN ${this.getDate()} ${ch} +${modes.join('')} :${prefix}${socket.uniqueId}\r\n`);
|
this.broadcastToAllServers(`:${this.serverId} SJOIN ${this.getDate()} ${ch} +${modes.join('')} :${prefix}${socket.uniqueId}\r\n`);
|
||||||
if (this.channeltopics.has(ch)) {
|
if (this.channeltopics.has(ch)) {
|
||||||
const topic = this.channeltopics.get(ch);
|
const topic = this.channeltopics.get(ch);
|
||||||
if (this.clientIsWebTV(socket)) {
|
if (topic) {
|
||||||
await this.sendThrottled(socket, [`:${this.servername} 332 ${socket.nickname} ${ch} :${topic}\r\n`]);
|
|
||||||
} else {
|
|
||||||
socket.write(`:${this.servername} 332 ${socket.nickname} ${ch} :${topic}\r\n`);
|
socket.write(`:${this.servername} 332 ${socket.nickname} ${ch} :${topic}\r\n`);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (this.clientIsWebTV(socket)) {
|
|
||||||
await this.sendThrottled(socket, [`:${this.servername} 331 ${socket.nickname} ${ch} :\r\n`]);
|
|
||||||
} else {
|
|
||||||
socket.write(`:${this.servername} 331 ${socket.nickname} ${ch} :\r\n`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
var users = this.getUsersInChannel(ch);
|
var users = this.getUsersInChannel(ch);
|
||||||
if (users.length > 0) {
|
if (users.length > 0) {
|
||||||
@@ -2139,14 +2131,10 @@ class WTVIRC {
|
|||||||
return `${user}!${username}@${host}`;
|
return `${user}!${username}@${host}`;
|
||||||
});
|
});
|
||||||
socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${userHosts.join(' ')}\r\n`);
|
socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${userHosts.join(' ')}\r\n`);
|
||||||
} else {
|
|
||||||
if (this.clientIsWebTV(socket)) {
|
|
||||||
await this.sendThrottled(socket, [`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`]);
|
|
||||||
} else {
|
} else {
|
||||||
socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`);
|
socket.write(`:${this.servername} 353 ${socket.nickname} = ${ch} :${users.join(' ')}\r\n`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
socket.write(`:${this.servername} 366 ${socket.nickname} ${ch} :End of /NAMES list\r\n`);
|
socket.write(`:${this.servername} 366 ${socket.nickname} ${ch} :End of /NAMES list\r\n`);
|
||||||
const ops = this.channelops.get(ch) || new Set();
|
const ops = this.channelops.get(ch) || new Set();
|
||||||
const halfops = this.channelhalfops.get(ch) || new Set();
|
const halfops = this.channelhalfops.get(ch) || new Set();
|
||||||
|
|||||||
Reference in New Issue
Block a user