@@ -626,7 +626,7 @@ server = doServer(tlsOptions,function(socket) {
626
626
connections [ this . hash ] . connected = false ;
627
627
connections [ this . hash ] . write ( "AWAY :away\n" ) ;
628
628
if ( BOUNCER_TIMEOUT != 0 && BOUNCER_TIMEOUT != null ) {
629
- connections [ this . hash ] . gone = setTimeout ( function ( x ) { try { connections [ x ] . end ( ) ; } catch ( e ) { } try { delete connections [ x ] ; } catch ( e ) { } } , BOUNCER_TIMEOUT * 1000 , this . hash ) ;
629
+ connections [ this . hash ] . gone = setTimeout ( ( ) => { connections [ this . hash ] . end ( ) ; delete connections [ this . hash ] ; } , BOUNCER_TIMEOUT * 1000 , this . hash ) ;
630
630
}
631
631
}
632
632
}
@@ -681,7 +681,10 @@ function clientReconnect(socket) {
681
681
_channel = connection . channels [ key ] ;
682
682
683
683
if ( _channel && _channel . name ) {
684
- socket . write ( "@time=" + new Date ( ) . toISOString ( ) + ";msgid=back :" + connection . nick + "!" + connection . ircuser + "@" + connection . host + " JOIN :" + _channel . name + "\n" ) ;
684
+ if ( connection . ircv3_extendedjoin )
685
+ socket . write ( "@time=" + new Date ( ) . toISOString ( ) + ";msgid=back :" + connection . nick + "!" + connection . ircuser + "@" + connection . host + " JOIN " + _channel . name + " " + ( connection . account ?connection . account :'*' ) + " :" + connection . realname + "\n" ) ;
686
+ else
687
+ socket . write ( "@time=" + new Date ( ) . toISOString ( ) + ";msgid=back :" + connection . nick + "!" + connection . ircuser + "@" + connection . host + " JOIN :" + _channel . name + "\n" ) ;
685
688
} else {
686
689
console . error ( `${ parseInt ( Number ( new Date ( ) ) / 1000 ) } Probleme bug undefined on join : ${ JSON . stringify ( _channel ) } ` ) ;
687
690
continue ;
@@ -825,6 +828,7 @@ function clientConnect(socket) {
825
828
connection . userhostInNames = false ;
826
829
connection . messagetags = false ;
827
830
connection . ircv3Monitor = false ;
831
+ connection . ircv3_extendedjoin = false ;
828
832
829
833
// Temp Buffer
830
834
connection . _buffer = '' ;
@@ -919,6 +923,9 @@ function clientConnect(socket) {
919
923
if ( requestingCaps . includes ( "sasl" ) )
920
924
this . sasl = true ;
921
925
926
+ if ( requestingCaps . includes ( "extended-join" ) )
927
+ this . ircv3_extendedjoin = true ;
928
+
922
929
if ( data [ 3 ] !== 'NEW' && requestingCaps . length === 0 ) {
923
930
this . write ( "CAP END\n" ) ;
924
931
} else {
0 commit comments