diff --git a/client/components/MessageTypes/raw.vue b/client/components/MessageTypes/raw.vue new file mode 100644 index 00000000..520e5087 --- /dev/null +++ b/client/components/MessageTypes/raw.vue @@ -0,0 +1,13 @@ + + + diff --git a/client/css/style.css b/client/css/style.css index 7fe19d79..b478b93a 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -271,6 +271,7 @@ kbd { #chat .whois .from::before, #chat .nick .from::before, #chat .action .from::before, +#chat .raw .from::before, #chat .toggle-button::after, #chat .toggle-content .more-caret::before, #chat .scroll-down-arrow::after, @@ -418,6 +419,15 @@ kbd { color: #ff4136; } +#chat .raw .from::before { + content: "\f101"; /* https://fontawesome.com/icons/angle-double-right?style=solid */ +} + +#chat .raw.self .from::before { + content: "\f359"; /* https://fontawesome.com/icons/arrow-alt-circle-left?style=solid */ + color: #2ecc40; +} + #chat .action .from::before { content: "\f005"; /* http://fontawesome.io/icon/star/ */ } diff --git a/src/models/msg.js b/src/models/msg.js index c74c03e0..72d5380b 100644 --- a/src/models/msg.js +++ b/src/models/msg.js @@ -46,6 +46,7 @@ class Msg { this.type !== Msg.Type.ERROR && this.type !== Msg.Type.TOPIC_SET_BY && this.type !== Msg.Type.MODE_CHANNEL && + this.type !== Msg.Type.RAW && this.type !== Msg.Type.WHOIS; } } @@ -73,6 +74,7 @@ Msg.Type = { TOPIC: "topic", TOPIC_SET_BY: "topic_set_by", WHOIS: "whois", + RAW: "raw", }; module.exports = Msg; diff --git a/src/plugins/irc-events/connection.js b/src/plugins/irc-events/connection.js index a05ce3dc..9fbc1b11 100644 --- a/src/plugins/irc-events/connection.js +++ b/src/plugins/irc-events/connection.js @@ -115,9 +115,8 @@ module.exports = function(irc, network) { if (Helper.config.debug.raw) { irc.on("raw", function(message) { network.channels[0].pushMessage(client, new Msg({ - from: message.from_server ? "«" : "»", self: !message.from_server, - type: "raw", + type: Msg.Type.RAW, text: message.line, }), true); });