From: Darren Date: Sun, 16 Jun 2013 15:52:12 +0000 (+0100) Subject: Adding WHOWAS command to the client X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=374133f18ed412dd9665e08a1fcc79422ed9b524;p=KiwiIRC.git Adding WHOWAS command to the client --- diff --git a/client/assets/src/models/application.js b/client/assets/src/models/application.js index 59b7d26..59cecf3 100644 --- a/client/assets/src/models/application.js +++ b/client/assets/src/models/application.js @@ -458,6 +458,8 @@ _kiwi.model.Application = function () { controlbox.on('command:whois', whoisCommand); + controlbox.on('command:whowas', whowasCommand); + controlbox.on('command:css', function (ev) { var queryString = '?reload=' + new Date().getTime(); @@ -773,6 +775,20 @@ _kiwi.model.Application = function () { } + function whowasCommand (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'); + } + + if (nick) + _kiwi.app.connections.active_connection.gateway.raw('WHOWAS ' + nick); + } + + function serverCommand (ev) { var server, port, ssl, password, nick, tmp;