From aa7fc991441fbd9e0ce9e89ce03b51c6593a6b08 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Wed, 26 Oct 2011 20:52:53 +0100 Subject: [PATCH] winner = correction fix --- modules/spelling.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/spelling.js b/modules/spelling.js index 30f4b0a..9f9c7e5 100644 --- a/modules/spelling.js +++ b/modules/spelling.js @@ -22,8 +22,10 @@ var spelling = function(dbot) { console.log(winner + ' ' + winnerDistance); if(winnerDistance < 3) { - var fix = last[data.channel][data.user].replace(winner, correction); - dbot.say(data.channel, data.user + ': ' + fix); + if(winner !== correction) { + var fix = last[data.channel][data.user].replace(winner, correction); + dbot.say(data.channel, data.user + ': ' + fix); + } } } else { if(last.hasOwnProperty(data.channel)) {