Skip to content

Commit 6550dbd

Browse files
committed
Update SASL
1 parent 92c70d6 commit 6550dbd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

bouncer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ var BOUNCER_DEFAULT_OPMODE = config.bouncerDefaultOpmode?config.bouncerDefaultOp
2929
const BOUNCER_MODE = config.mode?config.mode:'bouncer';
3030
const BOUNCER_TIMEOUT = config.bouncerTimeout?config.bouncerTimeout:0;
3131
const BUFFER_MAXSIZE = config.bufferMaxSize?config.bufferMaxSize:52428800;
32-
const BUFFER_LINEMAX = config.lineMax?config.lineMax:1500;
33-
const SASL = config.sasl?config.sasl:false;
32+
const BUFFER_LINEMAX = config.lineMax?config.lineMax:1500;
3433
const BOUNCER_SHACK = config.bouncerShack?config.bouncerShack:10;
3534
const SERVER_WEBIRC = config.webircPassword?config.webircPassword:'';
3635
const SERVER_WEBIRCHASHIP = config.webircHashIp?true:false;
@@ -835,25 +834,26 @@ function clientConnect(socket) {
835834
if(this.messagetags && lines[n].trim().indexOf("server-time")>=0) {
836835
this.write("CAP REQ :server-time\n");
837836
}
838-
if(SASL && lines[n].trim().indexOf("sasl")>=0) {
837+
if(lines[n].trim().indexOf("sasl")>=0) {
839838
this.write("CAP REQ :sasl\n");
839+
this.sasl=true;
840840
}
841-
if (!SASL)
841+
if (!this.sasl)
842842
this.write("CAP END\n");
843843
}
844-
else if(SASL && data[3] && data[3]=='ACK') {
844+
else if(this.sasl && data[3] && data[3]=='ACK') {
845845
if(lines[n].trim().indexOf("sasl")>=0) {
846846
this.write("AUTHENTICATE :PLAIN\n");
847847
}
848848
}
849849
else {
850-
if (!SASL)
850+
if (!this.sasl)
851851
this.write("CAP END\n");
852852
}
853853
continue;
854854
}
855855

856-
if(SASL && data[0]=="AUTHENTICATE" && data[1]=="+") {
856+
if(this.sasl && data[0]=="AUTHENTICATE" && data[1]=="+") {
857857
const auth_str = this.nick + '\0' +
858858
this.nick + '\0' +
859859
this.nickpassword;

0 commit comments

Comments
 (0)