Merge branch 'master' of github.com:reality/depressionbot

This commit is contained in:
reality 2013-01-29 00:53:54 +00:00
commit c3c52692a6
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,6 @@ var profile = function(dbot) {
// Ensure all known users have a profile
_.each(dbot.api.users.getAllUsers(), function(server, serverName){
_.each(server, function(primary, primaryi){
console.log(primary);
api.createProfile(serverName, primary);
});
});
@ -24,6 +23,7 @@ var profile = function(dbot) {
// Add API Hooks
dbot.api.command.addHook('~setaliasparent', this.api.renameProfile);
dbot.api.command.addHook('~mergeusers', this.api.mergeProfile);
dbot.api.event.addHook('new_user', this.api.createProfile);
};
};

View File

@ -48,7 +48,7 @@ var users = function(dbot) {
nick = this.api.resolveUser(event.server, nick);
} else {
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)) {