Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function Client(server, nick, opt) {
sasl: false,
stripColors: false,
channelPrefixes: "&#",
messageSplit: 512
messageSplit: 512,
identifyMsg: false
};

// Features supported by the server
Expand Down Expand Up @@ -521,6 +522,9 @@ function Client(server, nick, opt) {
message.args[1] === 'ACK' &&
message.args[2] === 'sasl ' ) // there's a space after sasl
self.send("AUTHENTICATE", "PLAIN");
if (opt.identifyMsg){
self.send("CAP", "END");
}
break;
case "AUTHENTICATE":
if ( message.args[0] === '+' ) self.send("AUTHENTICATE",
Expand Down Expand Up @@ -647,6 +651,9 @@ Client.prototype.connect = function ( retryCount, callback ) { // {{{
self.conn.setTimeout(0);
self.conn.setEncoding('utf8');
self.conn.addListener("connect", function () {
if (opt.identifyMsg){
self.send("CAP REQ", "identify-msg");
}
if ( self.opt.sasl ) {
// see http://ircv3.atheme.org/extensions/sasl-3.1
self.send("CAP REQ", "sasl");
Expand Down