From aa77dac9dae9a6f15a78e1624fbe2fd9dd03fae6 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 8 Jul 2009 04:22:15 +0100 Subject: mod_uptime: Convert to unix line endings --- plugins/mod_uptime.lua | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_uptime.lua b/plugins/mod_uptime.lua index e52fd57e..ffb55a3c 100644 --- a/plugins/mod_uptime.lua +++ b/plugins/mod_uptime.lua @@ -7,27 +7,27 @@ -- - -local st = require "util.stanza" - -local jid_split = require "util.jid".split; -local t_concat = table.concat; - -local start_time = os.time(); - -module:add_feature("jabber:iq:last"); - -module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", - function (origin, stanza) - if stanza.tags[1].name == "query" then - if stanza.attr.type == "get" then - local node, host, resource = jid_split(stanza.attr.to); - if node or resource then - -- TODO - else - origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); - return true; - end - end - end - end); + +local st = require "util.stanza" + +local jid_split = require "util.jid".split; +local t_concat = table.concat; + +local start_time = os.time(); + +module:add_feature("jabber:iq:last"); + +module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", + function (origin, stanza) + if stanza.tags[1].name == "query" then + if stanza.attr.type == "get" then + local node, host, resource = jid_split(stanza.attr.to); + if node or resource then + -- TODO + else + origin.send(st.reply(stanza):tag("query", {xmlns = "jabber:iq:last", seconds = tostring(os.difftime(os.time(), start_time))})); + return true; + end + end + end + end); -- cgit v1.2.3