forked from GitHub/dbot
event.rUser contains resolved user object from users module [#507]
This commit is contained in:
parent
96a566290d
commit
efe54b5e35
@ -142,6 +142,15 @@ var users = function(dbot) {
|
|||||||
this.on = ['JOIN', 'NICK'];
|
this.on = ['JOIN', 'NICK'];
|
||||||
|
|
||||||
this.onLoad = function() {
|
this.onLoad = function() {
|
||||||
|
dbot.instance.addPreEmitHook(function(event, callback) {
|
||||||
|
if(event.user) {
|
||||||
|
this.api.resolveUser(event.server, event.user, function(user) {
|
||||||
|
event.rUser = user;
|
||||||
|
callback(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}.bind(this));
|
||||||
|
|
||||||
dbot.instance.addListener('366', 'users', function(event) {
|
dbot.instance.addListener('366', 'users', function(event) {
|
||||||
this.api.getChannel(event.server, event.channel.name, function(channel) {
|
this.api.getChannel(event.server, event.channel.name, function(channel) {
|
||||||
var checkChannelUsers = function(channel) {
|
var checkChannelUsers = function(channel) {
|
||||||
|
Loading…
Reference in New Issue
Block a user