mirror of
https://github.com/reality/dbot.git
synced 2024-12-18 00:22:35 +01:00
fixed bug with ACTION, replaced with users name
This commit is contained in:
parent
036b926b28
commit
12c7721ef5
@ -17,10 +17,12 @@ var regex = function(dbot) {
|
|||||||
var user = q[1];
|
var user = q[1];
|
||||||
last = this.last[event.channel.name][user];
|
last = this.last[event.channel.name][user];
|
||||||
replacement = last.replace(toMatch, replaceWith);
|
replacement = last.replace(toMatch, replaceWith);
|
||||||
|
replacement = replacement.replace("\x01", '').replace(/^.ACTION/, user);
|
||||||
if(replacement != last) event.reply(event.user + " thinks " + user + " meant: " + replacement);
|
if(replacement != last) event.reply(event.user + " thinks " + user + " meant: " + replacement);
|
||||||
} else {
|
} else {
|
||||||
last = this.last[event.channel.name][event.user];
|
last = this.last[event.channel.name][event.user];
|
||||||
replacement = last.replace(toMatch, replaceWith);
|
replacement = last.replace(toMatch, replaceWith);
|
||||||
|
replacement = replacement.replace("\x01", '').replace(/^.ACTION/, event.user);
|
||||||
if(replacement != last) event.reply(event.user + " meant: " + replacement);
|
if(replacement != last) event.reply(event.user + " meant: " + replacement);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user