jbnc icon indicating copy to clipboard operation
jbnc copied to clipboard

Undefined channel

Open Madriix opened this issue 4 years ago • 0 comments

https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L355 Between line 354 and 355 I added this:

                  case 'CHANNELS':
                    for (key in connections[this.hash].channels) {
                      if (connections[this.hash].channels.hasOwnProperty(key)) {
                          this.write(":*jbnc NOTICE * :Salon actif: "+connections[this.hash].channels[key].name+"\n");
                      }
                    }
                    this.write(":*jbnc NOTICE * :Fin des salons actifs\n");
                    break;

Then to reproduce the undefined bug you have to do this manipulation:

  1. Connect to JBNC on the IRC server and join 2 rooms with at least 100 connected
  2. Then join a new lounge of 100 connected and leave immediately within 1 second (repeat this step 2 or 3 times if necessary)
  3. Then type /jbnc channels and there you will see an undefined channel like this:
:*jbnc NOTICE * :Salon actif: #15-25ans
:*jbnc NOTICE * :Salon actif: #adultes
:*jbnc NOTICE * :Salon actif: undefined
:*jbnc NOTICE * :Fin des salons actifs

How to solve this problem at the level of JBNC?

The bug occurs here: https://github.com/toc-irc/jbnc/blob/master/bouncer.js#L1134 or elsewhere.

Madriix avatar Sep 20 '21 16:09 Madriix