Software /
code /
prosody
Comparison
plugins/mod_xmlrpc.lua @ 889:bb959588bbc4
Added core.objectmanager
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 08 Mar 2009 01:07:29 +0500 |
parent | 880:ff4a08d73772 |
child | 892:2128891180b7 |
comparison
equal
deleted
inserted
replaced
888:1059230969c3 | 889:bb959588bbc4 |
---|---|
58 end | 58 end |
59 end | 59 end |
60 return stanza.tags[1]; | 60 return stanza.tags[1]; |
61 end | 61 end |
62 | 62 |
63 local function get_method(method) | 63 --[[local function get_method(method) |
64 return function(...) | 64 return function(...) |
65 return {method = method; args = {...}}; | 65 return {method = method; args = {...}}; |
66 end | 66 end |
67 end | 67 end]] |
68 local get_method = require "core.objectmanager".get_object; | |
68 | 69 |
69 local function handle_xmlrpc_request(method, args) | 70 local function handle_xmlrpc_request(method, args) |
70 method = get_method(method); | 71 method = get_method(method); |
71 if not method then return create_error_response(404, "method not found"); end | 72 if not method then return create_error_response(404, "method not found"); end |
72 args = args or {}; | 73 args = args or {}; |