kiwi.model.Application = Backbone.Model.extend(new (function () {\r
var that = this;\r
\r
+ // The auto connect details entered into the server select box\r
+ var auto_connect_details = {};\r
+\r
/** Instance of kiwi.model.PanelList */\r
this.panels = null;\r
\r
this.panels.server.server_login.on('server_connect', function (event) {\r
var form = this;\r
\r
+ auto_connect_details = event;\r
+\r
kiwi.gateway.set('nick', event.nick);\r
- kiwi.gateway.connect(event.server, 6667, false, false, function () {\r
- that.view.barsShow();\r
- });\r
+ kiwi.gateway.connect(event.server, 6667, false, false, function () {});\r
});\r
\r
};\r
});\r
\r
\r
- gw.on('onconnect', function (event) {});\r
+ gw.on('onconnect', function (event) {\r
+ that.view.barsShow();\r
+ \r
+ if (auto_connect_details.channel) {\r
+ kiwi.gateway.join(auto_connect_details.channel);\r
+ }\r
+ });\r
\r
\r
gw.on('onjoin', function (event) {\r