diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js index e86fc9b7..0d67ff61 100644 --- a/src/plugins/irc-events/message.js +++ b/src/plugins/irc-events/message.js @@ -11,12 +11,6 @@ module.exports = function (irc, network) { const client = this; irc.on("notice", function (data) { - // Some servers send notices without any nickname - if (!data.nick) { - data.from_server = true; - data.nick = data.hostname || network.host; - } - data.type = Msg.Type.NOTICE; handleMessage(data); }); @@ -44,6 +38,12 @@ module.exports = function (irc, network) { let showInActive = false; const self = data.nick === irc.user.nick; + // Some servers send messages without any nickname + if (!data.nick) { + data.from_server = true; + data.nick = data.hostname || network.host; + } + // Check if the sender is in our ignore list const shouldIgnore = !self &&