if ( User join to (Channel == Selected_Channel) ) { Message to... } | How to?

Started by Maniak, March 22, 2012, 10:12:34 PM

Previous topic - Next topic

Maniak

Hello, how i can send message to client when he join to selected room using servernotifyregister and notifyclientmoved ?

Stefan1200

You can register a channel event to get notified about joining or leaving clients. But this will only work for one channel at the time. If you need this for more channels, just track all clients with the clientlist.


Stefan1200


Maniak

no i need example code in java couse i dont understand how to do this.

where i have to put this:

addEventNotify(EVENT_MODE_CHANNEL, SELECTED_CHANNEL);

and

Stefan1200

Quote from: Maniak on March 28, 2012, 01:16:56 AM
no i need example code in java couse i dont understand how to do this.

There is already an example, look in the src directory of the JTS3ServerQuery library.

Stefan1200

Just an update: If you register the channel event for channel id 0, you get all channel events of every channel on that virtual server.