From: Jack Allnutt Date: Tue, 16 Jul 2013 17:16:10 +0000 (+0100) Subject: Allow default channel key to be specified in config file. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6d86afebfaff66dc8dad338e0df42812e756725e;p=KiwiIRC.git Allow default channel key to be specified in config file. Fixes #261 --- 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_";