From 16e9b2d9bdedbe9f3fa996015c732298e25c24a3 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 24 Mar 2015 19:32:19 +0000 Subject: [PATCH] i am not wise --- modules/words/words.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/words/words.js b/modules/words/words.js index a15ab08..826ab76 100644 --- a/modules/words/words.js +++ b/modules/words/words.js @@ -114,7 +114,7 @@ var words = function(dbot) { this.listener = function(event) { var matchOne = event.message.match(new RegExp(dbot.config.name + ': should (\\w+) (.+) or (.*)\\?', 'i')); if(matchOne) { - var pre = match[1]; + var pre = matcOneh[1]; if(pre == 'i' || pre == 'I') { pre = 'You'; } @@ -124,7 +124,7 @@ var words = function(dbot) { event.reply(pre + ' should ' + q); }); } else { - event.reply(pre + ' should ' + match[_.random(2, 3)].replace(/,/,'').replace(/should/,'')); + event.reply(pre + ' should ' + matchOne[_.random(2, 3)].replace(/,/,'').replace(/should/,'')); } } };