Merge pull request #4260 from BradleyShaw/snotice-channel

Display server-originated notices to channels in the channel window
This commit is contained in:
Max Leiter 2021-06-22 00:30:42 -07:00 committed by GitHub
commit aa310fe877
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,8 +51,13 @@ module.exports = function (irc, network) {
return Helper.compareHostmask(entry, data);
});
// Server messages go to server window, no questions asked
if (data.from_server) {
// Server messages that aren't targeted at a channel go to the server window
if (
data.from_server &&
(!data.target ||
!network.getChannel(data.target) ||
network.getChannel(data.target).type !== Chan.Type.CHANNEL)
) {
chan = network.channels[0];
from = chan.getUser(data.nick);
} else {