});\r
\r
\r
- gw.on('connect', function (event) {\r
+ // After the socket has connected, kiwi handshakes and then triggers a kiwi:connected event\r
+ gw.on('kiwi:connected', function (event) {\r
that.view.$el.addClass('connected');\r
if (gw_stat !== 1) return;\r
\r
\r
// Mention the re-connection on every channel\r
_kiwi.app.connections.forEach(function(connection) {\r
+ connection.reconnect();\r
+\r
connection.panels.server.addMsg('', styleText('rejoin', {text: msg}), 'action join');\r
\r
connection.panels.forEach(function(panel) {\r
this.parseKiwi = function (command, data) {\r
var args;\r
\r
- this.trigger('kiwi:' + command, data);\r
- this.trigger('kiwi', data);\r
-\r
switch (command) {\r
case 'connected':\r
// Send some info on this client to the server\r
\r
break;\r
}\r
+\r
+ this.trigger('kiwi:' + command, data);\r
+ this.trigger('kiwi', data);\r
};\r
\r
/**\r