\r
\r
gw.on('onnotice', function (event) {\r
- kiwi.app.panels.server.addMsg('', event.msg, 'notice');\r
+ var panel;\r
+\r
+ // If a panel isn't found for this channel, reroute to the\r
+ // server panel\r
+ panel = that.panels.getByName(event.target);\r
+ if (!panel) {\r
+ panel = that.panels.server;\r
+ }\r
+\r
+ panel.addMsg('[' + (event.nick||'') + ']', event.msg);\r
});\r
\r
\r
\r
controlbox.on('command_topic', this.topicCommand);\r
\r
+ controlbox.on('command_notice', this.noticeCommand);\r
+\r
controlbox.on('command_css', function (ev) {\r
var queryString = '?reload=' + new Date().getTime();\r
$('link[rel="stylesheet"]').each(function () {\r
kiwi.gateway.topic(channel_name, ev.params.join(' '));\r
};\r
\r
+ this.noticeCommand = function (ev) {\r
+ var destination;\r
+\r
+ // Make sure we have a destination and some sort of message\r
+ if (ev.params.length <= 1) return;\r
+\r
+ destination = ev.params[0];\r
+ ev.params.shift();\r
+\r
+ kiwi.gateway.notice(destination, ev.params.join(' '));\r
+ };\r
+\r
\r
\r
\r