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:
parent
e1c332daef
commit
447bcbabf8
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user