Permalink
Browse files

Update octospy.coffee with case insensitive regex. Fixes #491

  • Loading branch information...
1 parent 7dad14d commit ae5696c46216a2231656da6c5accb6dc0332728a @tombell tombell committed Jul 9, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/scripts/octospy.coffee
@@ -188,11 +188,11 @@ module.exports = (robot) ->
robot.brain.data.octospy ||= {}
# Public: Announce the kinds of things octospy knows about
- robot.respond /octospy events/, (msg) ->
+ robot.respond /octospy events/i, (msg) ->
msg.reply "I know about " + ( event for event of views ).join(', ')
# Public: Dump the watching hash
- robot.respond /octospying/, (msg) ->
+ robot.respond /octospying/i, (msg) ->
watching = []
# Troll octospy's data for any possible listeners, then see if they're us
@@ -221,7 +221,7 @@ module.exports = (robot) ->
# repo - The repository name (ex. 'github/hubot'
# event - The event type to stop watching (default: 'push')
# github_url - The base github URL (default: 'github.com'
- robot.respond /octospy stop ([^ ]+\/[^ ]+) ?([^ ]*)? ?([^ ]*)?/, (msg) ->
+ robot.respond /octospy stop ([^ ]+\/[^ ]+) ?([^ ]*)? ?([^ ]*)?/i, (msg) ->
repo = msg.match[1]
event = msg.match[2] || 'push'
github_url = msg.match[3] || 'github.com'
@@ -273,7 +273,7 @@ module.exports = (robot) ->
# repo - The repository name (ex. 'github/hubot'
# event - The event type to stop watching (default: 'push')
# github_url - The base github URL (default: 'github.com'
- robot.respond /octospy ([^ ]+\/[^ ]+) ?([^ ]*)? ?([^ ]*)?/, (msg) ->
+ robot.respond /octospy ([^ ]+\/[^ ]+) ?([^ ]*)? ?([^ ]*)?/i, (msg) ->
repo = msg.match[1]
event = msg.match[2] || 'push'
github_url = msg.match[3] || 'github.com'

0 comments on commit ae5696c

Please sign in to comment.