mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 11:42:36 +01:00
there we go
This commit is contained in:
parent
7bbea38454
commit
cc52b81eb2
@ -127,23 +127,24 @@ var report = function(dbot) {
|
||||
'message': message
|
||||
}, function() {});
|
||||
|
||||
var notifier = event.user,
|
||||
var notifier = '[' + event.user + ']',
|
||||
cChan = channelName,
|
||||
type = 'notify';
|
||||
if(_.has(this.config.colours, event.server)) {
|
||||
var colours = this.config.colours[event.server];
|
||||
|
||||
notifier = colours['nicks'] + notifier + '\u000f';
|
||||
notifier = '[' + colours['nicks'] + event.user + '\u000f]';
|
||||
type = colours['type'] + type + '\u000f';
|
||||
if(_.has(colours['channels'], channelName)) {
|
||||
cChan = colours['channels'][channelName] +
|
||||
cChan + "\u000f";
|
||||
}
|
||||
|
||||
_.each(message.match(/ @([\d\w\s*|-]+?)( |$)/g), function(user) {
|
||||
notifier += '[' + colours['nicks'] + user.replace(/ @/, "") + '\u000f]';
|
||||
_.each(message.match(/@([\d\w\s*|-]+?)( |$)/g), function(user) {
|
||||
user = user.replace(/@([\d\w\s*|-]+?)( |$)/, "$1");
|
||||
notifier += '[' + colours['nicks'] + user + '\u000f]';
|
||||
});
|
||||
message = message.replace(/ @([\d\w\s*|-]+?)( |$)/g, " " + colours['nicks'] +
|
||||
message = message.replace(/@([\d\w\s*|-]+?)( |$)/g, colours['nicks'] +
|
||||
"@$1\u000f ");
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,9 @@
|
||||
"it": "Non sono presente in {channel}."
|
||||
},
|
||||
"notify": {
|
||||
"en": "[{type}][{channel}][{notifier}] {message}",
|
||||
"fr": "[{type}][{channel}][{notifier}] {message}",
|
||||
"it": "[{type}][{channel}][{notifier}] {message}"
|
||||
"en": "[{type}][{channel}]{notifier} {message}",
|
||||
"fr": "[{type}][{channel}]{notifier} {message}",
|
||||
"it": "[{type}][{channel}]{notifier} {message}"
|
||||
},
|
||||
"notified": {
|
||||
"en": "{user}: {channel} staff notified.",
|
||||
|
Loading…
Reference in New Issue
Block a user