From: Darren Date: Wed, 13 Mar 2013 00:28:56 +0000 (+0000) Subject: Client: using a supplied channel key correctly X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ff2de846e4eb002a7925cf680bb8abe77067f52f;p=KiwiIRC.git Client: using a supplied channel key correctly --- diff --git a/client/assets/dev/model_application.js b/client/assets/dev/model_application.js index 1449e9b..bf48b7c 100644 --- a/client/assets/dev/model_application.js +++ b/client/assets/dev/model_application.js @@ -992,7 +992,12 @@ _kiwi.model.Application = function () { channel_names = ev.params.join(' ').split(','); - $.each(channel_names, function (index, channel_name) { + $.each(channel_names, function (index, channel_name_key) { + // We may have a channel key so split it off + var spli = channel_name_key.split(' '), + channel_name = spli[0], + channel_key = spli[1] || ''; + // Trim any whitespace off the name channel_name = channel_name.trim(); @@ -1010,7 +1015,7 @@ _kiwi.model.Application = function () { _kiwi.app.panels.add(channel); } - _kiwi.gateway.join(channel_name); + _kiwi.gateway.join(channel_name, channel_key); }); if (channel) channel.view.show();