Diff

mod_ipcheck/mod_ipcheck.lua @ 134:744deabdee81

mod_ipcheck: Fixed: 'service-unavailable' was sent instead of 'forbidden' on unauthorized access.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 06 Mar 2010 06:19:38 +0500
parent 131:46741fc09091
child 135:d3c28c5fdbae
line wrap: on
line diff
--- a/mod_ipcheck/mod_ipcheck.lua	Thu Feb 25 22:43:54 2010 +0100
+++ b/mod_ipcheck/mod_ipcheck.lua	Sat Mar 06 06:19:38 2010 +0500
@@ -8,7 +8,7 @@
 
 module:hook("iq/bare/urn:xmpp:sic:0:ip", function(event)
 	local origin, stanza = event.origin, event.stanza;
-	if not stanza.attr.to and stanza.attr.type == "get" then
+	if stanza.attr.type == "get" then
 		if stanza.attr.to then
 			origin.send(st.error_reply(stanza, "auth", "forbidden", "You can only ask about your own IP address"));
 		elseif origin.ip then