forked from GitHub/dbot
do that properly
This commit is contained in:
parent
bb934fb1db
commit
007540bead
@ -17,7 +17,9 @@ var spelling = function(dbot) {
|
|||||||
|
|
||||||
if(winnerDistance < 7) {
|
if(winnerDistance < 7) {
|
||||||
if(winner !== correction) {
|
if(winner !== correction) {
|
||||||
var fix = last[data.channel][candidate].replace(' ' + winner + ' ', correction);
|
candidates[i] = correction;
|
||||||
|
var fix = candidates.join(' ');
|
||||||
|
last[data.channel][candidate] = fix;
|
||||||
if (/^.ACTION/.test(fix)) {
|
if (/^.ACTION/.test(fix)) {
|
||||||
fix = fix.replace(/^.ACTION/, '/me');
|
fix = fix.replace(/^.ACTION/, '/me');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user