From 5d7c36fface80d861b709d4565ba81f0a761ec4a Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Tue, 19 May 2015 22:34:34 -0400 Subject: [PATCH] fix script match --- scripts/q.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/q.coffee b/scripts/q.coffee index 33be3d3..0e2e212 100644 --- a/scripts/q.coffee +++ b/scripts/q.coffee @@ -44,13 +44,13 @@ module.exports = (robot) -> rotation = robot.brain.get('rotation') if rotation == null || typeof rotation == "undefined"? rotation = [] - rotation.push res.match[0] + rotation.push res.match[1] robot.brain.set "rotation", rotation robot.respond /q remove (.*)/i, (res) -> rotation = robot.brain.get('rotation') current = robot.brain.get('current') - if(current == res.match[0]) + if(current == res.match[1]) res.send "User is currently on rotation" else rotation = rotation.filter (word) -> current