plugins/mod_uptime.lua

changeset 2017
347799c9caa6
parent 2016
5d47cfa4b2a0
child 2923
b7049746bd29
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);

mercurial