From 6d86afebfaff66dc8dad338e0df42812e756725e Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Tue, 16 Jul 2013 18:16:10 +0100 Subject: [PATCH] Allow default channel key to be specified in config file. Fixes #261 --- client/assets/src/models/application.js | 7 +++++++ config.example.js | 2 ++ 2 files changed, 9 insertions(+) diff --git a/client/assets/src/models/application.js b/client/assets/src/models/application.js index 023d921..60d7ee3 100644 --- a/client/assets/src/models/application.js +++ b/client/assets/src/models/application.js @@ -180,6 +180,9 @@ _kiwi.model.Application = function () { if (this.server_settings.client.channel) defaults.channel = this.server_settings.client.channel; + + if (this.server_settings.client.channel_key) + defaults.channel_key = this.server_settings.client.channel_key; } @@ -284,6 +287,10 @@ _kiwi.model.Application = function () { defaults.channel = this.server_settings.connection.channel; } + if (this.server_settings.connection.channel_key) { + defaults.channel_key = this.server_settings.connection.channel_key; + } + if (this.server_settings.connection.nick) { defaults.nick = this.server_settings.connection.nick; } diff --git a/config.example.js b/config.example.js index 43dff18..bd1a3d5 100644 --- a/config.example.js +++ b/config.example.js @@ -180,6 +180,7 @@ conf.client = { port: 6697, ssl: true, channel: '#kiwiirc', + channel_key: '', nick: 'kiwi_?', settings: { theme: 'relaxed', @@ -197,6 +198,7 @@ conf.client = { //conf.restrict_server_port = 6667; //conf.restrict_server_ssl = false; //conf.restrict_server_channel = "#kiwiirc"; +//conf.restrict_server_channel_key = ""; //conf.restrict_server_password = ""; //conf.restrict_server_nick = "kiwi_"; -- 2.25.1