From 520be40504674e4c65521780a8435048cc3defba Mon Sep 17 00:00:00 2001 From: reality Date: Fri, 21 Jun 2013 18:40:00 +0000 Subject: [PATCH] rChannel [#507] --- modules/users/users.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/users/users.js b/modules/users/users.js index b96ea2b..f41f432 100644 --- a/modules/users/users.js +++ b/modules/users/users.js @@ -150,6 +150,15 @@ var users = function(dbot) { }); } }.bind(this)); + + dbot.instance.addPreEmitHook(function(event, callback) { + if(event.channel) { + this.api.getChannel(event.server, event.channel.name, function(channel) { + event.rChannel = channel; + callback(false); + }); + } + }.bind(this)); dbot.instance.addListener('366', 'users', function(event) { this.api.getChannel(event.server, event.channel.name, function(channel) {