From 283cca28c09972fce4d9135907150dc0753e6fde Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Thu, 16 Jul 2015 12:00:05 +0200 Subject: [PATCH] Restrict overzealous "gg wp" regex. --- scripts/misc.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/misc.coffee b/scripts/misc.coffee index 2fa5ebc..18554ef 100644 --- a/scripts/misc.coffee +++ b/scripts/misc.coffee @@ -66,8 +66,8 @@ module.exports = (robot) -> res.send res.random(stato)+'. tu?' robot.respond /ridi/i, (res)-> res.send res.random risata - robot.hear /gg( \w+)?\.?$/i, (res)-> - res.send 'wp' unless res.match[1] is ' wp' + robot.hear /(^|.+ )gg(?!.*wp).*$/i, (res)-> + res.send 'wp' robot.hear /^bravo (\w+).?$/i, (res)-> unless res.match[1].match /asjon|assa|assion|assioni(?:i|e)/i res.send res.random(complim)+' '+res.match[1]