3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-28 21:52:38 +01:00

users emit for new users

This commit is contained in:
reality 2013-01-24 19:29:13 +00:00
parent e1c332daef
commit 447bcbabf8
2 changed files with 5 additions and 0 deletions

View File

@ -51,3 +51,6 @@ Return whether a user is online in a given channel on the given server.
#### nick_changed(server, newNick)
This is executed when a new alias is added for a user.
#### new_user(server, nick)
This is executed when a new primary user is added to the known users DB.

View File

@ -48,6 +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 ]);
}
if(!_.include(channelUsers, nick)) {
@ -78,6 +79,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 ]);
}
if(!_.include(channelUsers, nick)) {
channelUsers.push(nick);