From 6439afd5c6b51518af98728bb9eaee5a2137a8c3 Mon Sep 17 00:00:00 2001 From: JeDaYoshi Date: Sat, 3 Jul 2021 15:27:08 +0000 Subject: [PATCH] Fix nick-less PRIVMSGs from servers --- src/plugins/irc-events/message.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js index e86fc9b7..4aeeed21 100644 --- a/src/plugins/irc-events/message.js +++ b/src/plugins/irc-events/message.js @@ -27,6 +27,12 @@ module.exports = function (irc, network) { }); irc.on("privmsg", function (data) { + // Some servers send messages without any nickname + if (!data.nick) { + data.from_server = true; + data.nick = data.hostname || network.host; + } + data.type = Msg.Type.MESSAGE; handleMessage(data); });