i am not wise

This commit is contained in:
reality 2015-03-24 19:32:19 +00:00
parent 902cbdec3c
commit 16e9b2d9bd

View File

@ -114,7 +114,7 @@ var words = function(dbot) {
this.listener = function(event) { this.listener = function(event) {
var matchOne = event.message.match(new RegExp(dbot.config.name + ': should (\\w+) (.+) or (.*)\\?', 'i')); var matchOne = event.message.match(new RegExp(dbot.config.name + ': should (\\w+) (.+) or (.*)\\?', 'i'));
if(matchOne) { if(matchOne) {
var pre = match[1]; var pre = matcOneh[1];
if(pre == 'i' || pre == 'I') { if(pre == 'i' || pre == 'I') {
pre = 'You'; pre = 'You';
} }
@ -124,7 +124,7 @@ var words = function(dbot) {
event.reply(pre + ' should ' + q); event.reply(pre + ' should ' + q);
}); });
} else { } else {
event.reply(pre + ' should ' + match[_.random(2, 3)].replace(/,/,'').replace(/should/,'')); event.reply(pre + ' should ' + matchOne[_.random(2, 3)].replace(/,/,'').replace(/should/,''));
} }
} }
}; };