Commits

Johan Euphrosine committed d99ec95

fix bot multi zombie support

Comments (0)

Files changed (1)

         var handle = function(packet) {
           for (var k in expect) {
             var v = expect[k];
-            console.dir({ k:k, v:v, packet:packet});
-            if (v.length && v.indexOf(packet[k]) == -1) {
-              return;
+            if (toString.call(v) == '[object Array]') {
+              if (v.indexOf(packet[k]) == -1) {
+                return;
+              }
             } else if (v != packet[k]) {
               return;
             }
               var kill_zombie = function(showel, callback) {
                 if (zombies.length == 0) {
                   waitfor({t: 'C', oc: [oc.zombie,oc.zombie2]}, function(zombie) {
-                    console.log("KILL ZOMBIE");
                     kill_zombie(showel, callback);
                   });
                 } else {