fix for bug where Kiwi is unable to connect to a server that supports CAP
authorJack Allnutt <m2ys4u@Gmail.com>
Mon, 8 Aug 2011 14:37:24 +0000 (15:37 +0100)
committerJack Allnutt <m2ys4u@Gmail.com>
Mon, 8 Aug 2011 14:37:24 +0000 (15:37 +0100)
node/kiwi.js

index 40da463ebe535c3e3fd99652a71c58e1bcf57289..0a89b4fa063140ad604aea3c4bb69097f854381d 100644 (file)
@@ -311,7 +311,7 @@ var parseIRCMessage = function (websocket, ircSocket, data) {
         case 'CAP':
             caps = config.cap_options;
             options = msg.trailing.split(" ");
-            switch (_.first(msg.params.split(" "))) {
+            switch (_.last(msg.params.split(" "))) {
             case 'LS':
                 opts = '';
                 _.each(_.intersect(caps, options), function (cap) {