diff --git a/client/views/chan.tpl b/client/views/chan.tpl
index 37b18b33..7ac3a9d9 100644
--- a/client/views/chan.tpl
+++ b/client/views/chan.tpl
@@ -1,6 +1,6 @@
{{#each channels}}
- {{#if unread}}{{unread}}{{/if}}
+ {{#if unread}}{{unread}}{{/if}}
{{name}}
diff --git a/src/client.js b/src/client.js
index 46845a2e..89db3a92 100644
--- a/src/client.js
+++ b/src/client.js
@@ -320,6 +320,7 @@ Client.prototype.open = function(data) {
var target = this.find(data);
if (target) {
target.chan.unread = 0;
+ target.chan.highlight = false;
this.activeChannel = target.chan.id;
}
};
diff --git a/src/models/chan.js b/src/models/chan.js
index b493341b..c295b756 100644
--- a/src/models/chan.js
+++ b/src/models/chan.js
@@ -18,6 +18,7 @@ function Chan(attr) {
topic: "",
type: Chan.Type.CHANNEL,
unread: 0,
+ highlight: false,
users: []
}, attr));
}
diff --git a/src/plugins/irc-events/message.js b/src/plugins/irc-events/message.js
index 85ffed54..bc693211 100644
--- a/src/plugins/irc-events/message.js
+++ b/src/plugins/irc-events/message.js
@@ -46,6 +46,10 @@ module.exports = function(irc, network) {
if (chan.id !== client.activeChannel) {
chan.unread++;
+
+ if (highlight) {
+ chan.highlight = true;
+ }
}
var name = data.from;