]> jfr.im git - irc/freenode/jbnc.git/commitdiff
Update
authorMadriix <redacted>
Wed, 9 Sep 2020 23:31:42 +0000 (01:31 +0200)
committerMadriix <redacted>
Wed, 9 Sep 2020 23:31:42 +0000 (01:31 +0200)
bouncer.js

index 7e73f4ed27be4de07f29f542ceebbfbecd987568..913a49483eca0d8378f15d22ad447c8b064b1e8e 100644 (file)
@@ -805,7 +805,7 @@ function clientConnect(socket) {
       }
       
       if (true) {
-        for(let n=0;n<lines.length;n++) {
+        for(n=0;n<lines.length;n++) {
           if(DEBUG)
             console.log("> "+lines[n]);
           data = lines[n].trim().split(" ");
@@ -1207,10 +1207,14 @@ function clientConnect(socket) {
               }
               for(x=0;x<_names.length;x++) {
                 this.channels[_channel].names.push(_names[x].trim().split("!")[0]);
-                if(typeof this.channels[_channel].userhosts !== 'undefined' && _names[x].trim().indexOf("!")>=0)
+
+                if (typeof this.channels[_channel].userhosts === 'undefined')
+                  this.channels[_channel].userhosts=[];
+
+                if(_names[x].trim().indexOf("!")>=0)
                   this.channels[_channel].userhosts.push(_names[x].trim().split("!")[1]);
-                  /*else
-                                         this.channels[_channel].userhosts.push("*@*");        */                                              
+                /*else
+                  this.channels[_channel].userhosts.push("*@*");       */                                              
               }
               break;
             case '366':