This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Update ambush.coffee so that it will trim name

by doing this, it will detect full name.
  • Loading branch information...
take committed Sep 8, 2012
1 parent bed5fb0 commit 6db3b506d26510655e90c3cb0966db42e1446435
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/scripts/ambush.coffee
@@ -24,7 +24,7 @@ module.exports = (robot) ->
robot.brain.data.ambushes ||= {}
robot.respond /ambush (.*): (.*)/i, (msg) ->
- users = robot.usersForFuzzyName(msg.match[1])
+ users = robot.usersForFuzzyName(msg.match[1].trim())
if users.length is 1
user = users[0]
appendAmbush(robot.brain.data.ambushes, user, msg.message.user, msg.match[2])

0 comments on commit 6db3b50

Please sign in to comment.