2012-03-07 58 views

回答

3

在大多數命令XEP-133 做工精細與ejabberd。

你確實是正確的對沒有工作,包括獲取在線用戶的一些特殊的命令:我發現雖然有不規範的替代具體到ejabberd:

如果你得到一些有趣的主機上運行disco#items項目可以查詢:

<iq to="localhost" type="get" id="123"> 
    <query xmlns='http://jabber.org/protocol/disco#items' /> 
</iq> 


<iq from="localhost" type="result" to="[email protected]/jarnas" id="123"> 
    <query xmlns="http://jabber.org/protocol/disco#items"> 
     <item jid="conference.localhost" /> 
     <item jid="pubsub.localhost" /> 
     <item jid="riot.localhost" /> 
     <item jid="vjud.localhost" /> 
     <item node="announce" name="Announcements" jid="localhost" /> 
     <item node="config" name="Configuration" jid="localhost" /> 
     <item node="user" name="User Management" jid="localhost" /> 
     <item node="online users" name="Online Users" jid="localhost" /> 
     <item node="all users" name="All Users" jid="localhost" /> 
     <item node="outgoing s2s" name="Outgoing s2s Connections" jid="localhost" /> 
     <item node="running nodes" name="Running Nodes" jid="localhost" /> 
     <item node="stopped nodes" name="Stopped Nodes" jid="localhost" /> 
    </query> 
</iq> 

現在你如果你需要 「在線用戶」,所以:

<iq to="localhost" type="get" id="234"> 
    <query xmlns='http://jabber.org/protocol/disco#items' node="online users"/> 
</iq> 

<iq from="localhost" type="result" to="[email protected]/jarnas" id="234" > 
    <query xmlns="http://jabber.org/protocol/disco#items" node="online users" > 
     <item name="[email protected]" jid="[email protected]/auto-CdB67NUOie" /> 
     <item name="[email protected]" jid="[email protected]/jarnas" /> 
    </query> 
</iq> 

會像魅力一樣工作;)

+0

ggozad,請參閱https://support.process-one.net/browse/EJAB-325 – user766987 2012-03-07 23:33:14

+0

嗯,承諾明天將它調查。該票是舊的,我至少肯定你可以得到註冊用戶的名單,因爲我在一個項目中做。將會回來! – ggozad 2012-03-07 23:37:18

+0

會真的很感激! :)不幸的是我的項目必須使用PHP :(這是由於週六:(:(一直努力工作了一個多星期了) – user766987 2012-03-07 23:59:40

相關問題