From a83b1c2bd5ca5f8ac1437d096127fa54c69a5c4e Mon Sep 17 00:00:00 2001 From: Psychedelic Squid Date: Tue, 6 Mar 2012 23:04:37 +0000 Subject: [PATCH] Argh! winner, not correction. Old code would match _anything_, not good. --- modules/spelling.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/spelling.js b/modules/spelling.js index edd4fff..5ce2605 100644 --- a/modules/spelling.js +++ b/modules/spelling.js @@ -19,7 +19,7 @@ var spelling = function(dbot) { } } - if(winnerDistance < Math.ceil(correction.length * 1.33)) { + if(winnerDistance < Math.ceil(winner.length * 1.33)) { if(winner !== correction) { var fix = last[data.channel][candidate].replace(winner, correction); if (/^.ACTION/.test(fix)) {