userJoin
(since )
Event fired when a user join a channel.
Description
userJoin
This event is fired when a user join a channel.
This event is fired both on core and pipe the user joined
Arguments passed to the callback function
user
The user.
pipe
Pipe objet that user join.
Examples
//ape var is a reference to APE instance
ape.addEvent('userJoin', function (user, pipe) {
//An user join the channel
console.log('the user ' + user.properties.name + ' join the channel ' + pipe.properties.name);
});
//ape var is a reference to APE instance
//Join two channel
ape.join(['channel1', 'channel2']);
ape.addEvent('pipeCreate', function(type, pipe, options) {
//Attach userJoin event only to pipe "channel1"
if (type == 'multi' && pipe.properties.name =='channel1') {
pipe.addEvent('userJoin', function(user, pipe) {
console.log('New user on channel1');
});
}
});
User notes
# No comment
Post a note
CollaborAPE to our wiki !
Find the information you need on the APE Official Wiki : Install, Server, JSF, Help...
