From 83a37a88f9f7d3ec1929010d20b6839cb3d55e7e Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 27 Aug 2013 22:52:26 +0000 Subject: [PATCH] o dats coo --- modules/report/report.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/report/report.js b/modules/report/report.js index e126353..4249357 100644 --- a/modules/report/report.js +++ b/modules/report/report.js @@ -160,7 +160,21 @@ var report = function(dbot) { message = event.input[2]; 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', { 'user': event.user,