From e1047362a2f80b20412eb4c8e14ad3294fcd9526 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Wed, 15 Feb 2012 20:34:01 +0000 Subject: [PATCH] this rather than dbot --- run.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.js b/run.js index e17cce8..bbb93f6 100644 --- a/run.js +++ b/run.js @@ -111,7 +111,7 @@ DBot.prototype.reloadModules = function() { // See if it's similar to anything var winnerDistance = Infinity; var winner = false; - for(var commandName in dbot.commands) { + for(var commandName in this.commands) { var distance = String.prototype.distance(params[0], commandName); if(distance < winnerDistance) { winner = commandName; @@ -120,7 +120,7 @@ DBot.prototype.reloadModules = function() { } if(winnerDistance < 3) { - dbot.say(data.channel, 'Did you mean ' + winner + '? Learn to type, hippie!'); + this.say(data.channel, 'Did you mean ' + winner + '? Learn to type, hippie!'); } else { // See if there's anything in quotes var q = data.message.valMatch(/^~([\d\w\s-]*)/, 2); if(q) {