'RPL_WELCOME': function (command) {
var nick = command.params[0];
this.irc_connection.registered = true;
- this.cap_negotation = false;
+ this.cap_negotiation = false;
this.irc_connection.emit('server ' + this.irc_connection.irc_host.hostname + ' connect', {
nick: nick
});
this.irc_connection.write('CAP REQ :' + request.join(' '));
} else {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
}
break;
case 'ACK':
this.irc_connection.write('AUTHENTICATE PLAIN');
} else {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
}
}
break;
}
if (this.irc_connection.cap.requested.length > 0) {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
}
break;
case 'LIST':
}
} else {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
}
},
'RPL_SASLAUTHENTICATED': function (command) {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
this.irc_connection.sasl = true;
},
'RPL_SASLLOGGEDIN': function (command) {
- if (this.irc_connection.cap_negotation === false) {
+ if (this.irc_connection.cap_negotiation === true) {
this.irc_connection.write('CAP END');
+ this.irc_connection.cap_negotiation = false;
}
},
'ERR_SASLNOTAUTHORISED': function (command) {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
},
'ERR_SASLABORTED': function (command) {
this.irc_connection.write('CAP END');
- this.irc_connection.cap_negotation = false;
+ this.irc_connection.cap_negotiation = false;
},
'ERR_SASLALREADYAUTHED': function (command) {