if (serv[serv.length-1] === '/')\r
serv = serv.substring(0, serv.length-1);\r
\r
- _kiwi.app.kiwi_server = serv;\r
-\r
// Force the jumpserver now?\r
if (data.force) {\r
// Get an interval between 5 and 6 minutes so everyone doesn't reconnect it all at once\r
that.message.text(msg, {timeout: 8000});\r
\r
setTimeout(function forcedReconnectPartTwo() {\r
- _kiwi.gateway.set('kiwi_server', _kiwi.app.kiwi_server);\r
+ _kiwi.app.kiwi_server = serv;\r
\r
_kiwi.gateway.reconnect(function() {\r
// Reconnect all the IRC connections\r
* @param {Function} callback A callback function to be invoked once Kiwi's server has connected to the IRC server\r
*/\r
this.connect = function (callback) {\r
+ // Keep note of the server we are connecting to\r
+ this.set('kiwi_server', _kiwi.app.kiwi_server);\r
+\r
this.socket = new EngineioTools.ReconnectingSocket(this.get('kiwi_server'), {\r
path: _kiwi.app.get('base_path') + '/transport',\r
reconnect_max_attempts: 5,\r
// If not connected already, connect then send the IRC connect info
if (!_kiwi.gateway.isConnected()) {
- _kiwi.gateway.set('kiwi_server', _kiwi.app.kiwi_server);
_kiwi.gateway.connect(function() {
that.makeConnection(new_connection_event);
});