3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

o dats coo

This commit is contained in:
reality 2013-08-27 22:52:26 +00:00
parent 0ced8cf27c
commit 83a37a88f9

View File

@ -160,7 +160,21 @@ var report = function(dbot) {
message = event.input[2]; message = event.input[2];
if(_.has(event.allChannels, channelName)) { if(_.has(event.allChannels, channelName)) {
this.api.notify('notify', event.server, event.rUser, channelName, message); if(this.config.firstHost) {
var first = message.split(' ')[0];
dbot.api.users.resolveUser(event.server, first, function(user) {
if(user) {
dbot.api.nickserv.getUserHost(event.server, first, function(host) {
message = message.replace(first, first + ' [' + host + ']');
this.api.notify('notify', event.server, event.rUser, channelName, message);
}.bind(this));
} else {
this.api.notify('notify', event.server, event.rUser, channelName, message);
}
}.bind(this));
} else {
this.api.notify('notify', event.server, event.rUser, channelName, message);
}
event.reply(dbot.t('notified', { event.reply(dbot.t('notified', {
'user': event.user, 'user': event.user,