From a2d23810bf298bbeaac0d8b49b6a1b912cdb3ac1 Mon Sep 17 00:00:00 2001 From: Bradley Shaw Date: Tue, 22 Jun 2021 11:50:22 +0100 Subject: [PATCH] Differentiate WALLOPS from NOTICE --- client/css/style.css | 9 ++++++++- src/models/msg.js | 1 + src/plugins/irc-events/message.js | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index 080ad044..5d62a575 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -1507,8 +1507,11 @@ textarea.input { } #chat .msg[data-type="notice"] .time, +#chat .msg[data-type="wallops"] .time, #chat .msg[data-type="notice"] .content, -#chat .msg[data-type="notice"] .user { +#chat .msg[data-type="wallops"] .content, +#chat .msg[data-type="notice"] .user, +#chat .msg[data-type="wallops"] .user { color: #0074d9; } @@ -1516,6 +1519,10 @@ textarea.input { content: "Notice: "; } +#chat .msg[data-type="wallops"] .from .user::before { + content: "Wallops: "; +} + #chat .msg[data-type="error"], #chat .msg[data-type="error"] .from { color: #e74c3c; diff --git a/src/models/msg.js b/src/models/msg.js index b3619b08..705f4e1d 100644 --- a/src/models/msg.js +++ b/src/models/msg.js @@ -79,6 +79,7 @@ Msg.Type = { WHOIS: "whois", RAW: "raw", PLUGIN: "plugin", + WALLOPS: "wallops", }; module.exports = Msg; diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js index cb4818a3..e86fc9b7 100644 --- a/src/plugins/irc-events/message.js +++ b/src/plugins/irc-events/message.js @@ -33,7 +33,7 @@ module.exports = function (irc, network) { irc.on("wallops", function (data) { data.from_server = true; - data.type = Msg.Type.NOTICE; + data.type = Msg.Type.WALLOPS; handleMessage(data); });