3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 14:29:29 +01:00

tagging at the back@ too

This commit is contained in:
reality 2015-06-25 14:28:21 +00:00
parent 2483ec1ef6
commit c584e7b8f5

View File

@ -35,10 +35,10 @@ console.log('sending msg to ' + nick);
message = message.replace(/(#[\w\-]+)/g, '\u000312$1\u000f');
_.each(message.match(/ @([\d\w*|-]+)/g), function(u) {
u = u.substr(1);
_.each(_.union(message.match(/ @([\d\w*|-]+)/g), message.match(/([\d\w*|-]+)@ ?/g)), function(u) {
u = u.replace(/\s|@/g/, '');
message = message.replace(u, colours['nicks'] + u + "\u000f");
notifier += '[' + colours['nicks'] + u.substr(1) + '\u000f]';
notifier += '[' + colours['nicks'] + u + '\u000f]';
});
}