From: Darren Date: Sun, 29 Dec 2013 20:31:29 +0000 (+0000) Subject: Second IRC connection via /server fix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eb2acc926f09f566b1473f4c2721a12d7f0cb62c;p=KiwiIRC.git Second IRC connection via /server fix --- diff --git a/client/src/models/newconnection.js b/client/src/models/newconnection.js index 9899c92..8d1b558 100644 --- a/client/src/models/newconnection.js +++ b/client/src/models/newconnection.js @@ -14,11 +14,16 @@ _kiwi.model.NewConnection = Backbone.Collection.extend({ this.view.networkConnecting(); - - _kiwi.gateway.set('kiwi_server', _kiwi.app.kiwi_server); - _kiwi.gateway.connect(function() { - that.makeConnection(new_connection_event); - }); + // 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); + }); + + } else { + this.makeConnection(new_connection_event); + } },