forked from GitHub/dbot
winner = correction fix
This commit is contained in:
parent
c707849980
commit
aa7fc99144
@ -22,8 +22,10 @@ var spelling = function(dbot) {
|
|||||||
console.log(winner + ' ' + winnerDistance);
|
console.log(winner + ' ' + winnerDistance);
|
||||||
|
|
||||||
if(winnerDistance < 3) {
|
if(winnerDistance < 3) {
|
||||||
var fix = last[data.channel][data.user].replace(winner, correction);
|
if(winner !== correction) {
|
||||||
dbot.say(data.channel, data.user + ': ' + fix);
|
var fix = last[data.channel][data.user].replace(winner, correction);
|
||||||
|
dbot.say(data.channel, data.user + ': ' + fix);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(last.hasOwnProperty(data.channel)) {
|
if(last.hasOwnProperty(data.channel)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user