mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 12:12:35 +01:00
Merge pull request #248 from SamStudio8/master
Fixed new_user emit misfire
This commit is contained in:
commit
45d2bae004
@ -15,7 +15,6 @@ var profile = function(dbot) {
|
|||||||
// Ensure all known users have a profile
|
// Ensure all known users have a profile
|
||||||
_.each(dbot.api.users.getAllUsers(), function(server, serverName){
|
_.each(dbot.api.users.getAllUsers(), function(server, serverName){
|
||||||
_.each(server, function(primary, primaryi){
|
_.each(server, function(primary, primaryi){
|
||||||
console.log(primary);
|
|
||||||
api.createProfile(serverName, primary);
|
api.createProfile(serverName, primary);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -24,6 +23,7 @@ var profile = function(dbot) {
|
|||||||
// Add API Hooks
|
// Add API Hooks
|
||||||
dbot.api.command.addHook('~setaliasparent', this.api.renameProfile);
|
dbot.api.command.addHook('~setaliasparent', this.api.renameProfile);
|
||||||
dbot.api.command.addHook('~mergeusers', this.api.mergeProfile);
|
dbot.api.command.addHook('~mergeusers', this.api.mergeProfile);
|
||||||
|
dbot.api.event.addHook('new_user', this.api.createProfile);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ var users = function(dbot) {
|
|||||||
nick = this.api.resolveUser(event.server, nick);
|
nick = this.api.resolveUser(event.server, nick);
|
||||||
} else {
|
} else {
|
||||||
knownUsers.users.push(nick);
|
knownUsers.users.push(nick);
|
||||||
dbot.api.emit('new_user', [ event.server, nick ]);
|
dbot.api.event.emit('new_user', [ event.server, nick ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!_.include(channelUsers, nick)) {
|
if(!_.include(channelUsers, nick)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user