comparison mod_ipcheck/mod_ipcheck.lua @ 135:d3c28c5fdbae

mod_ipcheck: Change error from 'item-not-found' to 'service-unavailable' for missing IP.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 06 Mar 2010 06:20:38 +0500
parents 744deabdee81
children 0525c66e7d13
comparison
equal deleted inserted replaced
134:744deabdee81 135:d3c28c5fdbae
13 origin.send(st.error_reply(stanza, "auth", "forbidden", "You can only ask about your own IP address")); 13 origin.send(st.error_reply(stanza, "auth", "forbidden", "You can only ask about your own IP address"));
14 elseif origin.ip then 14 elseif origin.ip then
15 origin.send(st.reply(stanza):tag("ip", {xmlns='urn:xmpp:sic:0'}):text(origin.ip)); 15 origin.send(st.reply(stanza):tag("ip", {xmlns='urn:xmpp:sic:0'}):text(origin.ip));
16 else 16 else
17 -- IP addresses should normally be available, but in case they are not 17 -- IP addresses should normally be available, but in case they are not
18 origin.send(st.error_reply(stanza, "cancel", "item-not-found", "IP address for this session is not available")); 18 origin.send(st.error_reply(stanza, "cancel", "service-unavailable", "IP address for this session is not available"));
19 end 19 end
20 return true; 20 return true;
21 end 21 end
22 end); 22 end);