Remove mode extraction from RPL_LIST replies.
authorJack Allnutt <m2ys4u@Gmail.com>
Sat, 1 Oct 2011 08:28:42 +0000 (09:28 +0100)
committerJack Allnutt <m2ys4u@Gmail.com>
Sat, 1 Oct 2011 08:28:42 +0000 (09:28 +0100)
Fixes problem when no modes are set or there is a space in the mode list.

node/app.js

index 7898bf5b59f566e291b2a5ab3c24794636e31b23..8b066859f678959160ca7492014adcba22d68e8f 100644 (file)
@@ -213,15 +213,14 @@ this.parseIRCMessage = function (websocket, ircSocket, data) {
                 parts = msg.params.split(' ');
                 channel = parts[1];
                 num_users = parts[2];
-                modes = msg.trailing.split(' ', 1);
-                topic = msg.trailing.substring(msg.trailing.indexOf(' ') + 1);
+                topic = msg.trailing;
 
                 //websocket.sendClientEvent('list_channel', {
                 websocket.kiwi.buffer.list.push({
                     server: '',
                     channel: channel,
                     topic: topic,
-                    modes: modes,
+                    //modes: modes,
                     num_users: parseInt(num_users, 10)
                 });