@@ -29,8 +29,7 @@ var BOUNCER_DEFAULT_OPMODE = config.bouncerDefaultOpmode?config.bouncerDefaultOp
29
29
const BOUNCER_MODE = config . mode ?config . mode :'bouncer' ;
30
30
const BOUNCER_TIMEOUT = config . bouncerTimeout ?config . bouncerTimeout :0 ;
31
31
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 ;
34
33
const BOUNCER_SHACK = config . bouncerShack ?config . bouncerShack :10 ;
35
34
const SERVER_WEBIRC = config . webircPassword ?config . webircPassword :'' ;
36
35
const SERVER_WEBIRCHASHIP = config . webircHashIp ?true :false ;
@@ -835,25 +834,26 @@ function clientConnect(socket) {
835
834
if ( this . messagetags && lines [ n ] . trim ( ) . indexOf ( "server-time" ) >= 0 ) {
836
835
this . write ( "CAP REQ :server-time\n" ) ;
837
836
}
838
- if ( SASL && lines [ n ] . trim ( ) . indexOf ( "sasl" ) >= 0 ) {
837
+ if ( lines [ n ] . trim ( ) . indexOf ( "sasl" ) >= 0 ) {
839
838
this . write ( "CAP REQ :sasl\n" ) ;
839
+ this . sasl = true ;
840
840
}
841
- if ( ! SASL )
841
+ if ( ! this . sasl )
842
842
this . write ( "CAP END\n" ) ;
843
843
}
844
- else if ( SASL && data [ 3 ] && data [ 3 ] == 'ACK' ) {
844
+ else if ( this . sasl && data [ 3 ] && data [ 3 ] == 'ACK' ) {
845
845
if ( lines [ n ] . trim ( ) . indexOf ( "sasl" ) >= 0 ) {
846
846
this . write ( "AUTHENTICATE :PLAIN\n" ) ;
847
847
}
848
848
}
849
849
else {
850
- if ( ! SASL )
850
+ if ( ! this . sasl )
851
851
this . write ( "CAP END\n" ) ;
852
852
}
853
853
continue ;
854
854
}
855
855
856
- if ( SASL && data [ 0 ] == "AUTHENTICATE" && data [ 1 ] == "+" ) {
856
+ if ( this . sasl && data [ 0 ] == "AUTHENTICATE" && data [ 1 ] == "+" ) {
857
857
const auth_str = this . nick + '\0' +
858
858
this . nick + '\0' +
859
859
this . nickpassword ;
0 commit comments