Software /
code /
prosody
Comparison
plugins/mod_uptime.lua @ 438:193f9dd64f17
Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 27 Nov 2008 03:12:12 +0000 |
parent | 421:63be85693710 |
child | 519:cccd610a0ef9 |
comparison
equal
deleted
inserted
replaced
437:c1a720db2157 | 438:193f9dd64f17 |
---|---|
6 | 6 |
7 local start_time = os.time(); | 7 local start_time = os.time(); |
8 | 8 |
9 require "core.discomanager".set("uptime", "jabber:iq:last"); | 9 require "core.discomanager".set("uptime", "jabber:iq:last"); |
10 | 10 |
11 add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", | 11 module:add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", |
12 function (origin, stanza) | 12 function (origin, stanza) |
13 if stanza.tags[1].name == "query" then | 13 if stanza.tags[1].name == "query" then |
14 if stanza.attr.type == "get" then | 14 if stanza.attr.type == "get" then |
15 local node, host, resource = jid_split(stanza.attr.to); | 15 local node, host, resource = jid_split(stanza.attr.to); |
16 if node or resource then | 16 if node or resource then |