bindGatewayEvents: function () {
//this.gateway.on('all', function() {console.log('ALL', this.get('connection_id'), arguments);});
- this.gateway.on('connect', function(event) {
- this.set('nick', event.nick);
- }, this);
+ this.gateway.on('connect', onConnect, this);
this.gateway.on('nick', function(event) {
if (event.nick === this.get('nick')) {
+ function onConnect(event) {
+ this.set('nick', event.nick);
+
+ if (this.auto_join && this.auto_join.channel) {
+ this.gateway.join(this.auto_join.channel, this.auto_join.channel_key);
+ }
+ }
+
+
+
function onOptions(event) {
var that = this;