File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -862,9 +862,18 @@ function clientConnect(socket) {
862
862
continue ;
863
863
}
864
864
865
- if ( SASL && data [ 1 ] == "903" ) {
866
- this . write ( "CAP END\n" ) ;
867
- continue ;
865
+ // :irc.server 904 <nick> :SASL authentication failed
866
+ if ( data [ 1 ] == "904" ) {
867
+ if ( ! this . authenticated ) {
868
+ this . end ( ) ;
869
+ }
870
+ }
871
+
872
+ // :x 903 y :SASL authentication successful
873
+ if ( data [ 1 ] == "903" ) {
874
+ if ( ! this . authenticated ) {
875
+ this . write ( "CAP END\n" ) ;
876
+ }
868
877
}
869
878
870
879
let s = ( data [ 2 ] == "JOIN" || data [ 2 ] == "PART" || data [ 2 ] == "QUIT" || data [ 2 ] == "MODE" || data [ 2 ] == "PING" || data [ 2 ] == "NICK" || data [ 2 ] == "KICK" ? data [ 2 ] : data [ 1 ] ) ;
@@ -1251,7 +1260,7 @@ function clientConnect(socket) {
1251
1260
}
1252
1261
break ;
1253
1262
}
1254
- if ( data [ 1 ] == "PING" ) {
1263
+ if ( data [ 1 ] == "PING" ) {
1255
1264
this . write ( "PONG " + data [ 2 ] . substr ( 1 ) . trim ( ) + "\n" ) ;
1256
1265
continue ;
1257
1266
}
@@ -1295,7 +1304,7 @@ function clientConnect(socket) {
1295
1304
this . parents [ x ] . end ( ) ;
1296
1305
}
1297
1306
this . buffers = false ;
1298
- delete connections [ hash ( this . nick + this . password + this . server + this . port . toString ( ) ) ] ;
1307
+ delete connections [ hash ( this . nick + this . password + this . server + this . port . toString ( ) ) ] ;
1299
1308
this . destroy ( ) ;
1300
1309
} ) ;
1301
1310
connection . on ( 'error' , function ( err ) {
You can’t perform that action at this time.
0 commit comments