diff --git a/modules/spelling.js b/modules/spelling.js index 5db8da4..cb5cc60 100644 --- a/modules/spelling.js +++ b/modules/spelling.js @@ -1,55 +1,49 @@ var spelling = function(dbot) { var dbot = dbot; var last = {}; + + var correct = function (data, correction, candidate, output_callback) { + var candidates = last[data.channel][candidate].split(' '); + var winner = false; + var winnerDistance = Infinity; //urgh fix later + + for(var i=0;i