Erlang/OTP Forums

Author Message

<  Ejabberd mailing list  ~  how to find out user IP address from external component?

Guest
Posted: Sun Oct 11, 2009 3:21 pm Reply with quote
Guest
I'm writing external XMPP component, and I couldn't figure out how to
get IP address of each client connected. Is it possible without
writing module for ejabberd?g
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Sun Oct 11, 2009 3:26 pm Reply with quote
Guest
2009/10/11 Max Ivanov <ivanov.maxim@gmail.com>:
> I'm writing external XMPP component, and I couldn't figure out how to
> get IP address of each client connected. Is it possible without
> writing module for ejabberd?g

I guess the only way is module. But it shouldnt be hard, about dozen
lines of code.
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
cstar
Posted: Sun Oct 11, 2009 4:27 pm Reply with quote
Joined: 05 Jan 2009 Posts: 4
Or you can send an admin command :
<iq type="set" to="domain" id="aaf1a" >
<command xmlns="http://jabber.org/protocol/commands" node="http://jabber.org/protocol/admin#user-stats
" sessionid="2009-10-11T16:19:52.346756Z" >
<x xmlns="jabber:x:data" type="submit" >
<field type="hidden" var="FORM_TYPE" >
<value>http://jabber.org/protocol/admin</value>
</field>
<field type="jid-single" var="accountjid" >
<value>user@domain</value>
</field>
</x>
</command>
</iq>

Answer :
<iq from="domain" type="result" to="admin@domain" id="aaf1a" >
<command xmlns="http://jabber.org/protocol/commands"
status="completed" node="http://jabber.org/protocol/admin#user-stats"
sessionid="2009-10-11T16:19:52.346756Z" >
<x xmlns="jabber:x:data">
<field type="hidden" var="FORM_TYPE" >
<value>http://jabber.org/protocol/admin</value>
</field>
<field type="jid-single" label="Jabber ID" var="accountjid" >
<value>user@domain</value>
</field>
<field type="text-single" label="Roster size" var="rostersize" >
<value>42</value>
</field>
<field type="text-multi" label="IP addresses" var="ipaddresses" >
<value>127.0.0.1:1320</value>
</field>
<field type="text-multi" label="Resources" var="onlineresources" >
<value>res</value>
</field>
</x>
</command>
</iq>


All info is available. Of course the user admin@domain (or fake user
generated from the component) has to be declared admin in ejabberd.cfg :

{acl, admin, {user, "admin", "domain"}}.

Eric

Le 11 oct. 2009
View user's profile Send private message
wuji
Posted: Thu Aug 23, 2012 6:48 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
lass passengers, crew members and government employees flying from Amsterdam Amsterdam cheap Ralph Lauren Polo Amsterdam to the United States.At least one batch of 17
appeared to be made by a U.S. company based at at [h1]replica designer bags for sale[/h1] at Amsterdam's Schiphol airport. Those sandwiches were served board Delta's
to Minneapolis-St. Paul Sunday afternoon. Two passengers aboard the flight flight [h4]designer replica *beep*[/h4] flight found needles in their sandwiches, officials confirmed. The sandwiches
turned over by Delta to Customs and Border Patrol.Two passengers passengers [h2]cheap louboutins[/h2] passengers sustained minor injuries after biting into the sandwiches and
officials found a third needle after confiscating the sandwiches, according according [h3]cheap polo shirts[/h3] according to an official report."Delta is taking this matter extremely
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum