Mercurial > psgxs
diff modules/mod_configure.js @ 41:bc717575e66a
Much better handling of modules.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 20 Feb 2011 15:51:12 +0100 |
parents | 6697f394301f |
children | 023f767662d3 |
line wrap: on
line diff
--- a/modules/mod_configure.js +++ b/modules/mod_configure.js @@ -1,11 +1,3 @@ -var config = require('../configuration'); -var storage = require('../storage'); -var forms = require('../forms'); -var errors = require('../errors'); -var makeError = errors.makeError; -var toBareJID = require('../fdsq').toBareJID; -var NS = require('../namespaces'); - // SECTION 8.2: Configure a Node exports.getConfigure = { type: 'get', @@ -30,8 +22,8 @@ exports.getConfigure = { if (!conf) return makeError(response, 42); // FIXME - response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}); - response.c('configure', {node: nodeID}); + response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}) + .c('configure', {node: nodeID}); var form = forms.build('form', 'node_config', conf, true); response.cnode(form); @@ -50,8 +42,8 @@ exports.default = { if (!config.enabled('config-node')) return makeError(response, errors.owner.default_options.node_configuration_not_supported.n); - response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}); - response.c('default'); + response.c('pubsub', {xmlns: NS.PUBSUB_OWNER}) + .c('default'); var form = forms.build('node_config', service_configuration.node_config, null, true); response.cnode(form);