diff modules/mod_owner.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 7e421278b31b
line wrap: on
line diff
--- a/modules/mod_owner.js
+++ b/modules/mod_owner.js
@@ -35,13 +35,13 @@ exports.create = {
 		if (!nodeID || nodeID == '') {
 			if (!config.enabled('instant-nodes'))
 				return makeError(response, errors.owner.create.instant_nodes_not_supported.n);
-			nodeID = fdsq.makeRandomId();
+			nodeID = makeRandomId();
 			instant = true;
 		}
 		if (storage.existsNode(nodeID))
 			return makeError(response, errors.owner.create.nodeid_already_exists.n);
 
-		var bare = toBareJID(to);
+		var bare = JID.toBare(to);
 		var right = false;
 
 		// Check for super-owner
@@ -88,7 +88,7 @@ exports['delete'] = {
 		if (!storage.existsNode(nodeID))
 			return makeError(response, errors.node_does_not_exist.n);
 
-		var affil = storage.getAffiliation(toBareJID(to), nodeID);
+		var affil = storage.getAffiliation(JID.toBare(to), nodeID);
 		if (affil != 'super-owner' && affil != 'owner')
 			return makeError(response, errors.forbidden.n);
 
@@ -118,7 +118,7 @@ exports.purge = {
 		if (!storage.existsNode(nodeID))
 			return makeError(response, errors.node_does_not_exist.n);
 
-		var affil = storage.getAffiliation(toBareJID(to), nodeID);
+		var affil = storage.getAffiliation(JID.toBare(to), nodeID);
 		if (affil != 'super-owner' && affil != 'owner')
 			return makeError(response, errors.forbidden.n);