\r
if (typeof connection_id !== 'undefined') {\r
connection_event = 'connection:' + connection_id.toString();\r
+ } else {\r
+ connection_event = 'connection';\r
}\r
\r
var obj = new this.EventComponent(_kiwi.gateway, connection_event);\r
bindGatewayCommands: function (gw) {\r
var that = this;\r
\r
- gw.on('connect', function (event) {\r
+ // As soon as an IRC connection is made, show the full client UI\r
+ gw.on('connection:connect', function (event) {\r
that.view.barsShow();\r
});\r
\r
}\r
\r
// Trigger the global events\r
- that.trigger(command, data);\r
+ that.trigger('connection', {event_name: command, event_data: data});\r
+ that.trigger('connection:' + command, data);\r
};\r
\r
this.rpcCall = function(method, connection_id) {\r