});\r
\r
\r
+ gw.on('onctcp_response', function (event) {\r
+ that.panels.server.addMsg('[' + event.nick + ']', 'CTCP ' + event.msg);\r
+ });\r
+\r
+\r
gw.on('onnotice', function (event) {\r
var panel;\r
\r
\r
controlbox.on('command_clear', clearCommand);\r
\r
+ controlbox.on('command_ctcp', ctcpCommand);\r
+\r
\r
controlbox.on('command_css', function (ev) {\r
var queryString = '?reload=' + new Date().getTime();\r
}\r
}\r
\r
+ function ctcpCommand(ev) {\r
+ var target, type;\r
+\r
+ // Make sure we have a target and a ctcp type (eg. version, time)\r
+ if (ev.params.length < 2) return;\r
+\r
+ target = ev.params[0];\r
+ ev.params.shift();\r
+\r
+ type = ev.params[0];\r
+ ev.params.shift();\r
+\r
+ _kiwi.gateway.ctcp(true, type, target, ev.params.join(' '));\r
+ }\r
+\r
function settingsCommand (ev) {\r
var settings = _kiwi.model.Applet.loadOnce('kiwi_settings');\r
settings.view.show();\r