Author Topic: if ( User join to (Channel == Selected_Channel) ) { Message to... } | How to?  (Read 13854 times)

Maniak

  • Newbie
  • *
  • Posts: 5
    • View Profile
Hello, how i can send message to client when he join to selected room using servernotifyregister and notifyclientmoved ?

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
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.

Maniak

  • Newbie
  • *
  • Posts: 5
    • View Profile
Can you show me an example? :)

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
Can you show me an example? :)

What do you need? Just the ServerQuery commands?

Maniak

  • Newbie
  • *
  • Posts: 5
    • View Profile
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
« Last Edit: March 28, 2012, 01:20:02 AM by Maniak »

Stefan1200

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
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

  • Administrator
  • *****
  • Posts: 2244
    • View Profile
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.