diff --git a/modules/spelling/spelling.js b/modules/spelling/spelling.js index 5c955ef..23db3cc 100644 --- a/modules/spelling/spelling.js +++ b/modules/spelling/spelling.js @@ -74,9 +74,13 @@ var distance = function(s1, s2) { }; var spelling = function(dbot) { - var last = {}; - var correct = function (event, correction, candidate, output_callback) { - var rawCandidates = allGroupings(last[event.channel.name][candidate].split(' ')); + this.name = 'spelling'; + this.ignorable = true; + + this.last = {}; + this.internalAPI = {}; + this.internalAPI.correct = function (event, correction, candidate, output_callback) { + var rawCandidates = allGroupings(this.last[event.channel.name][candidate].split(' ')); var candidates = []; for(var i=0;i