comparison mod_stanza_counter/mod_stanza_counter_http.lua @ 678:429be98872dc

mod_stanza_counter_http: change the skipped get_option_array to get_option_string it was supposed to.
author Marco Cirillo <maranda@lightwitch.org>
date Sat, 26 May 2012 11:37:44 +0000
parents f7aacd9e93de
children 7dbde05b48a9
comparison
equal deleted inserted replaced
677:eeb41cd5e9f3 678:429be98872dc
1 -- (C) 2011, Marco Cirillo (LW.Org) 1 -- (C) 2011, Marco Cirillo (LW.Org)
2 -- Exposes stats on HTTP for the stanza counter module. 2 -- Exposes stats on HTTP for the stanza counter module.
3 3
4 module:depends("http") 4 module:depends("http")
5 5
6 local base_path = module:get_option_array("stanza_counter_basepath", "/stanza-counter/") 6 local base_path = module:get_option_string("stanza_counter_basepath", "/stanza-counter/")
7 7
8 -- http handlers 8 -- http handlers
9 9
10 local r_200 = "\n<html>\n<head>\n<title>Prosody's Stanza Counter</title>\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n</head>\n\n<body>\n<h3>Incoming and Outgoing stanzas divided per type</h3>\n<p><strong>Incoming IQs</strong>: %d<br/>\n<strong>Outgoing IQs</strong>: %d<br/>\n<strong>Incoming Messages</strong>: %d<br/>\n<strong>Outgoing Messages</strong>: %d<br/>\n<strong>Incoming Presences</strong>: %d<br/>\n<strong>Outgoing Presences</strong>: %d<p>\n</body>\n\n</html>\n" 10 local r_200 = "\n<html>\n<head>\n<title>Prosody's Stanza Counter</title>\n<meta name=\"robots\" content=\"noindex, nofollow\" />\n</head>\n\n<body>\n<h3>Incoming and Outgoing stanzas divided per type</h3>\n<p><strong>Incoming IQs</strong>: %d<br/>\n<strong>Outgoing IQs</strong>: %d<br/>\n<strong>Incoming Messages</strong>: %d<br/>\n<strong>Outgoing Messages</strong>: %d<br/>\n<strong>Incoming Presences</strong>: %d<br/>\n<strong>Outgoing Presences</strong>: %d<p>\n</body>\n\n</html>\n"
11 11