Stefan Strigler wrote:

How do I do this with Net::Jabber? How do I get the results of this query
in a convenient way? (I "just" want to know who is online)
It's just a matter of logging in and sending the XML you posted. I have a script that does this using Jabber::Connection (not Net::Jabber) if you are interested in that.

As for output, you'll have to figure out what format you want. The jabber server will hand you back an XML packet like so:

<iq id='3' type='result' to='[EMAIL PROTECTED]/test' from='jabber.org'><query xmlns='jabber:iq:admin'><who><presence from='[EMAIL PROTECTED]/Exodus'><show>xa</show><priority/><x xmlns='jabber:x:delay' stamp='20030129T22:42:48' from='[EMAIL PROTECTED]/Exodus'/>
<presence [... from other users ...] />
</who></query></iq>

You can display this any way you want - just the usernames, or more complicated - depends on what you want.

-R

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev


Reply via email to