support rfc2812-style LIST
authorPepijn de Vos <pepijndevos@gmail.com>
Fri, 12 Apr 2013 12:43:27 +0000 (14:43 +0200)
committerPepijn de Vos <pepijndevos@gmail.com>
Fri, 12 Apr 2013 12:43:27 +0000 (14:43 +0200)
server/irc/server.js

index 412af8dd25e01ee659634f57b9a9c6c8b29af34c..63902e7ab22e620dd4afe33a9c8760cc783c0017 100755 (executable)
@@ -64,9 +64,13 @@ function onOptions(event) {
 function onListStart(event) {
     this.irc_connection.clientEvent('list_start', {});
     this.list_buffer = [];
+    this.busy_listing = true;
 };
 
 function onListChannel(event) {
+    if (!this.busy_listing) {
+      onListStart.call(this, event);
+    }
     var buf;
     this.list_buffer.push({
         channel: event.channel,
@@ -97,7 +101,7 @@ function onListEnd(event) {
         chans: buf
     });
     this.list_buffer = [];
-
+    this.busy_listing = false;
     
     this.irc_connection.clientEvent('list_end', {});
 };