File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -222,15 +222,15 @@ server = doServer(tlsOptions,function(socket) {
222
222
}
223
223
else if ( commands [ 1 ] ) {
224
224
this . irc . nick = commands [ 1 ] . trim ( ) ;
225
- if ( this . irc . user ) {
225
+ /* if(this.irc.user) {
226
226
this.hash=hash(this.irc.nick+this.irc.user+this.irc.password+this.irc.server+this.irc.port.toString());
227
227
if(connections[socket.hash]) {
228
228
clientReconnect(this);
229
229
}
230
230
else {
231
231
clientConnect(this);
232
232
}
233
- }
233
+ }*/
234
234
}
235
235
break ;
236
236
case 'USER' :
@@ -446,9 +446,11 @@ server = doServer(tlsOptions,function(socket) {
446
446
break ;
447
447
case 'QUIT' :
448
448
this . write ( ":*jbnc NOTICE * :Sayonara.\n" ) ;
449
- connections [ this . hash ] . write ( "QUIT :jbnc gateway\n" ) ;
450
- connections [ this . hash ] . end ( ) ;
451
- delete connections [ this . hash ] ;
449
+ if ( typeof connections [ this . hash ] !== 'undefined' ) {
450
+ connections [ this . hash ] . write ( "QUIT :jbnc gateway\n" ) ;
451
+ connections [ this . hash ] . end ( ) ;
452
+ delete connections [ this . hash ] ;
453
+ }
452
454
break ;
453
455
case 'PASS' :
454
456
if ( command [ 3 ] ) {
@@ -612,8 +614,12 @@ function clientReconnect(socket) {
612
614
socket . write ( "@time=null;msgid=null :" + connection . nick + "!" + connection . ircuser + "@" + connection . host + " JOIN :" + _channel . name + "\n" ) ;
613
615
_mode_params = '' ;
614
616
615
- if ( typeof _channel . modes === 'undefined' )
616
- _channel . modes = "" ;
617
+ if ( typeof _channel . modes === 'undefined' )
618
+ _channel . modes = "" ;
619
+
620
+ if ( typeof _channel . topic === 'undefined' )
621
+ _channel . topic = "" ;
622
+
617
623
618
624
for ( x = 0 ; x < _channel . modes . length ; x ++ ) {
619
625
switch ( _channel . modes [ x ] ) {
You can’t perform that action at this time.
0 commit comments