From d6146b379838288fe187496ee888fd3d820e1725 Mon Sep 17 00:00:00 2001 From: Darren Date: Wed, 5 Jun 2013 23:25:09 +0100 Subject: [PATCH] WHOIS now sending 'whois $nick $nick'; /w alias added for /whois; Read nick from active query window if not given; #281 --- client/assets/src/models/application.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/client/assets/src/models/application.js b/client/assets/src/models/application.js index f222bef..f47e6c1 100644 --- a/client/assets/src/models/application.js +++ b/client/assets/src/models/application.js @@ -410,6 +410,7 @@ _kiwi.model.Application = function () { '/me': '/action $1+', '/j': '/join $1+', '/q': '/query $1+', + '/w': '/whois $1+', // Op related aliases '/op': '/quote mode $channel +o $1+', @@ -455,6 +456,8 @@ _kiwi.model.Application = function () { controlbox.on('command:server', serverCommand); + controlbox.on('command:whois', whoisCommand); + controlbox.on('command:css', function (ev) { var queryString = '?reload=' + new Date().getTime(); @@ -756,6 +759,19 @@ _kiwi.model.Application = function () { } + function whoisCommand (ev) { + var nick; + + if (ev.params[0]) { + nick = ev.params[0]; + } else if (_kiwi.app.panels().active.isQuery()) { + nick = _kiwi.app.panels().active.get('name'); + } + + _kiwi.app.connections.active_connection.gateway.raw('WHOIS ' + nick + ' ' + nick); + } + + function serverCommand (ev) { var server, port, ssl, password, nick, tmp; -- 2.25.1