Allow default channel key to be specified in config file.
authorJack Allnutt <jack@allnutt.eu>
Tue, 16 Jul 2013 17:16:10 +0000 (18:16 +0100)
committerJack Allnutt <jack@allnutt.eu>
Tue, 16 Jul 2013 17:16:10 +0000 (18:16 +0100)
Fixes #261

client/assets/src/models/application.js
config.example.js

index 023d921e27fa39ee1f80dcdb71a2252e638936cb..60d7ee366bf584ee916f65e75343dda91cb24753 100644 (file)
@@ -180,6 +180,9 @@ _kiwi.model.Application = function () {
 \r
                 if (this.server_settings.client.channel)\r
                     defaults.channel = this.server_settings.client.channel;\r
+\r
+                if (this.server_settings.client.channel_key)\r
+                    defaults.channel_key = this.server_settings.client.channel_key;\r
             }\r
 \r
 \r
@@ -284,6 +287,10 @@ _kiwi.model.Application = function () {
                     defaults.channel = this.server_settings.connection.channel;\r
                 }\r
 \r
+                if (this.server_settings.connection.channel_key) {\r
+                    defaults.channel_key = this.server_settings.connection.channel_key;\r
+                }\r
+\r
                 if (this.server_settings.connection.nick) {\r
                     defaults.nick = this.server_settings.connection.nick;\r
                 }\r
index 43dff18c14d45d9991accd5531b9d8587085855b..bd1a3d535d92bf174f71a181aa4190b63b0efc71 100644 (file)
@@ -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_";