]> jfr.im git - irc/freenode/jbnc.git/commitdiff
Update bouncer.js
authorMadriix <redacted>
Sat, 25 Sep 2021 14:11:45 +0000 (16:11 +0200)
committerGitHub <redacted>
Sat, 25 Sep 2021 14:11:45 +0000 (16:11 +0200)
See the list of connected channels (useful for debugging)

bouncer.js

index 7cad46705fc37e26af7e043b4b7b2ad027a39c30..2d6fd3a2461677baae84883cd451ef17f7a0400d 100644 (file)
@@ -352,6 +352,14 @@ server = doServer(tlsOptions,function(socket) {
               }
               else {
                 switch(command[1].toUpperCase().trim()) {
+                  case 'CHANNELS':
+                    for (key in connections[this.hash].channels) {
+                      if (connections[this.hash].channels.hasOwnProperty(key)) {
+                          this.write(":*jbnc NOTICE * :Active channel: "+connections[this.hash].channels[key].name+"\n");
+                      }
+                    }
+                    this.write(":*jbnc NOTICE * :End of active channels\n");
+                    break;
                   case 'OPMODE':
                     if(command[2]) {
                       if(command[2].toLowerCase().trim()=="on") {