powered by Jive Software

Send special message to a room

I need to pass some special messages. It’'s posile to send special messages to a specified room, that triguers costomized events defined by me? in the same way that “login” and “receivedata” from XMPconnection class, but a custome ones, like “newroomabailable”.


There is so many ways to do it…

-You can broadcast messages to online users (add YOURDOMAIN/announce/online in your roster and write a message to it) if you’'re the admin of the server ( in jabber.xml)

-[/b] the problem will be that every body will see it unless you filter it (you’'ll have to send messages like “to: chess message: new_room_available: chess0045”)


-You can create a specific room which will be made for “broadcasting” messages, in fact, ppl logs to 2 chatroom, one to play, one to keep an eye on what happens globally… but you need to do 2 differents chat context… and program it twice (of add a “isGlobalChat” boolean value) -> the event is triggered when a new message is arrived on the GlobalChat (equivalent of broadcast) and the message could be sth like: “new_room_available: chess0045” and the roomName “chess”

-[/b] the problem will be the configuration of this room… only you (or a known process) should be able to speak in the room and other must just listen.

+/b simple

You’'ll just have to trigger the event when you get the correct sentence. And be sure the way you use is secure.

Now, the second problem… being aware of new room creation… I don’‘t think jabber server will permit you to link new room creation and broadcast message, so you should probably try an other sytem (using a public room…)… but it’'s more jabber use than XIFF programming

Can you give me some example code of that? I don’‘t understand it, maybe because I have beeng in my computer about 20 hours, but I don’'t know how to send a message to a room, with the type changued.