Mercurial > psgxs
comparison modules.js @ 47:0d3f18bb1d36
Remove usage of fdsq.js in modules.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 10 Mar 2011 16:13:49 +0100 |
parents | 023f767662d3 |
children | 99bd1d1ac071 |
comparison
equal
deleted
inserted
replaced
46:3126f8d6a5e3 | 47:0d3f18bb1d36 |
---|---|
25 var dir = require('./configuration').pluginsDir; | 25 var dir = require('./configuration').pluginsDir; |
26 var files = fs.readdirSync(dir); | 26 var files = fs.readdirSync(dir); |
27 var regex = /^mod_.*\.js/; | 27 var regex = /^mod_.*\.js/; |
28 | 28 |
29 var Script = process.binding('evals').Script; | 29 var Script = process.binding('evals').Script; |
30 var fdsq = require('./fdsq'); | |
30 var sandbox = { | 31 var sandbox = { |
31 process: process, | 32 process: process, |
32 config: require('./configuration'), | 33 config: require('./configuration'), |
33 xmpp: require('xmpp'), | 34 xmpp: require('xmpp'), |
34 errors: require('./errors'), | 35 errors: require('./errors'), |
36 makeError: require('./errors').makeError, | 37 makeError: require('./errors').makeError, |
37 notifs: require('./notifs'), | 38 notifs: require('./notifs'), |
38 NS: require('./namespaces'), | 39 NS: require('./namespaces'), |
39 require: require, | 40 require: require, |
40 storage: require('./storage'), | 41 storage: require('./storage'), |
41 toBareJID: require('./fdsq').toBareJID, | 42 makeRandomId: fdsq.makeRandomId, |
43 JID: { | |
44 toBare: fdsq.toBare, | |
45 toResource: fdsq.toResource | |
46 }, | |
42 exports: {} | 47 exports: {} |
43 }; | 48 }; |
44 | 49 |
45 for (var i in files) { | 50 for (var i in files) { |
46 var file = files[i]; | 51 var file = files[i]; |