mirror of
https://github.com/reality/dbot.git
synced 2024-11-24 12:59:34 +01:00
Argh! winner, not correction. Old code would match _anything_, not good.
This commit is contained in:
parent
68943d6c8f
commit
a83b1c2bd5
@ -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) {
|
if(winner !== correction) {
|
||||||
var fix = last[data.channel][candidate].replace(winner, correction);
|
var fix = last[data.channel][candidate].replace(winner, correction);
|
||||||
if (/^.ACTION/.test(fix)) {
|
if (/^.ACTION/.test(fix)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user