Comparison

plugins/mod_uptime.lua @ 2017:347799c9caa6

mod_uptime: Removed event hook for iq/bare. mod_uptime only deals with iq/host queries.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 18 Oct 2009 22:45:41 +0500
parent 2016:5d47cfa4b2a0
child 2923:b7049746bd29
comparison
equal deleted inserted replaced
2016:5d47cfa4b2a0 2017:347799c9caa6
18 if stanza.attr.type == "get" then 18 if stanza.attr.type == "get" then
19 origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); 19 origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))}));
20 return true; 20 return true;
21 end 21 end
22 end); 22 end);
23
24 module:hook("iq/bare/jabber:iq:last:query", function(event)
25 local origin, stanza = event.origin, event.stanza;
26 if stanza.attr.type == "get" then
27 -- TODO last activity
28 end
29 end);