[jdev] Re: type='available' in <presence/> stanza
Magnus Henoch
mange at freemail.hu
Tue Mar 28 16:48:51 CST 2006
"Norman Rasmussen" <norman at rasmussen.co.za> writes:
>> For example:
>> <presence xml:lang="en" from="xy at jabber.domain.tld"
>> type="available" to="user at jabber2.domain.tld/Laptop" / >
>
> If you can _please_ track down this user and find out which software
> they're using. Take the software out and shoot it :-P
There are less violent ways. For example, you can just disconnect
them from the server ;)
--- orig/src/ejabberd_c2s.erl
+++ mod/src/ejabberd_c2s.erl
@@ -776,6 +776,10 @@
_ ->
case Name of
"presence" ->
+ case xml:get_attr_s("type", Attrs) of
+ "available" -> die = horrible_death;
+ _ -> ok
+ end,
case ToJID of
#jid{user = User,
server = Server,
--
Magnus
JID: legoscia at jabber.cd.chalmers.se
More information about the JDev
mailing list