Mercurial > prosody-modules
comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 580:10a9538f41f1
mod_muc_log_http: Return a 500 Internal Server Error on missing theme, not a traceback.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 25 Jan 2012 04:22:10 +0500 |
parents | 513aa6fed9e9 |
children | a9a97df60b8c |
comparison
equal
deleted
inserted
replaced
579:513aa6fed9e9 | 580:10a9538f41f1 |
---|---|
650 if node == "" then node = nil; end | 650 if node == "" then node = nil; end |
651 if day == "" then day = nil; end | 651 if day == "" then day = nil; end |
652 | 652 |
653 node = urldecode(node); | 653 node = urldecode(node); |
654 | 654 |
655 assert(html.doc, "MUC hosts or theme not loaded"); | 655 if not html.doc then return { status = "500 Internal Server Error", "MUC hosts or theme not loaded" }; end |
656 | 656 |
657 if host and not(hosts[host] and hosts[host].modules.muc and hosts[host].modules.muc_log) then return { status = "404 Not found", body = "No such MUC component" }; end | 657 if host and not(hosts[host] and hosts[host].modules.muc and hosts[host].modules.muc_log) then return { status = "404 Not found", body = "No such MUC component" }; end |
658 if host and node and not(hosts[host].modules.muc.rooms[node.."@"..host]) then return { status = "404 Not found", body = "No such MUC room" }; end | 658 if host and node and not(hosts[host].modules.muc.rooms[node.."@"..host]) then return { status = "404 Not found", body = "No such MUC room" }; end |
659 | 659 |
660 if not host then -- main component list | 660 if not host then -- main component list |