3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 03:33:07 +01:00

winner = correction fix

This commit is contained in:
Luke Slater 2011-10-26 20:52:53 +01:00
parent c707849980
commit aa7fc99144

View File

@ -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)) {