Software / code / prosody
Comparison
plugins/mod_uptime.lua @ 421:63be85693710
Modules now sending disco replies
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Wed, 26 Nov 2008 08:27:09 +0500 |
| parent | 314:851f271d25b0 |
| child | 438:193f9dd64f17 |
comparison
equal
deleted
inserted
replaced
| 420:aa1db0a80089 | 421:63be85693710 |
|---|---|
| 3 | 3 |
| 4 local jid_split = require "util.jid".split; | 4 local jid_split = require "util.jid".split; |
| 5 local t_concat = table.concat; | 5 local t_concat = table.concat; |
| 6 | 6 |
| 7 local start_time = os.time(); | 7 local start_time = os.time(); |
| 8 | |
| 9 require "core.discomanager".set("uptime", "jabber:iq:last"); | |
| 8 | 10 |
| 9 add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", | 11 add_iq_handler({"c2s", "s2sin"}, "jabber:iq:last", |
| 10 function (origin, stanza) | 12 function (origin, stanza) |
| 11 if stanza.tags[1].name == "query" then | 13 if stanza.tags[1].name == "query" then |
| 12 if stanza.attr.type == "get" then | 14 if stanza.attr.type == "get" then |
| 18 return true; | 20 return true; |
| 19 end | 21 end |
| 20 end | 22 end |
| 21 end | 23 end |
| 22 end); | 24 end); |
| 23 | |
| 24 |