Software /
code /
prosody-modules
Comparison
mod_stanza_counter/mod_stanza_counter_http.lua @ 437:78a2a6b2bea3
mod_stanza_counter: missing end.
author | Marco Cirillo <maranda@lightwitch.org> |
---|---|
date | Tue, 20 Sep 2011 23:31:43 +0000 |
parent | 436:e4a1f0425380 |
child | 518:d4adda950546 |
comparison
equal
deleted
inserted
replaced
436:e4a1f0425380 | 437:78a2a6b2bea3 |
---|---|
24 end | 24 end |
25 | 25 |
26 local function req(method, body, request) | 26 local function req(method, body, request) |
27 if not prosody.stanza_counter then | 27 if not prosody.stanza_counter then |
28 local err500 = r_err:format("500", "Stats not found, is the counter module loaded?") | 28 local err500 = r_err:format("500", "Stats not found, is the counter module loaded?") |
29 return res(500, err500) | 29 return res(500, err500) end |
30 if method == "GET" then | 30 if method == "GET" then |
31 local forge_res = r_200:format(prosody.stanza_counter.iq["incoming"], | 31 local forge_res = r_200:format(prosody.stanza_counter.iq["incoming"], |
32 prosody.stanza_counter.iq["outgoing"], | 32 prosody.stanza_counter.iq["outgoing"], |
33 prosody.stanza_counter.message["incoming"], | 33 prosody.stanza_counter.message["incoming"], |
34 prosody.stanza_counter.message["outgoing"], | 34 prosody.stanza_counter.message["outgoing"], |