MUC: Removed commented code.

Wed, 09 Sep 2009 19:14:12 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Wed, 09 Sep 2009 19:14:12 +0500
changeset 1764
c00d4ba8d2f3
parent 1763
9e4ff3b66ed1
child 1765
79c6b23cb56c

MUC: Removed commented code.

plugins/muc/muc.lib.lua file | annotate | diff | comparison | revisions
--- a/plugins/muc/muc.lib.lua	Wed Sep 09 14:35:41 2009 +0100
+++ b/plugins/muc/muc.lib.lua	Wed Sep 09 19:14:12 2009 +0500
@@ -585,59 +585,3 @@
 end
 
 return _M;
-
---[[function get_disco_info(stanza)
-	return st.iq({type='result', id=stanza.attr.id, from=muc_domain, to=stanza.attr.from}):query("http://jabber.org/protocol/disco#info")
-		:tag("identity", {category='conference', type='text', name=muc_name}):up()
-		:tag("feature", {var="http://jabber.org/protocol/muc"}); -- TODO cache disco reply
-end
-function get_disco_items(stanza)
-	local reply = st.iq({type='result', id=stanza.attr.id, from=muc_domain, to=stanza.attr.from}):query("http://jabber.org/protocol/disco#items");
-	for room in pairs(rooms_info:get()) do
-		reply:tag("item", {jid=room, name=rooms_info:get(room, "name")}):up();
-	end
-	return reply; -- TODO cache disco reply
-end]]
-
---[[function handle_to_domain(origin, stanza)
-	local type = stanza.attr.type;
-	if type == "error" or type == "result" then return; end
-	if stanza.name == "iq" and type == "get" then
-		local xmlns = stanza.tags[1].attr.xmlns;
-		if xmlns == "http://jabber.org/protocol/disco#info" then
-			origin.send(get_disco_info(stanza));
-		elseif xmlns == "http://jabber.org/protocol/disco#items" then
-			origin.send(get_disco_items(stanza));
-		else
-			origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- TODO disco/etc
-		end
-	else
-		origin.send(st.error_reply(stanza, "cancel", "service-unavailable", "The muc server doesn't deal with messages and presence directed at it"));
-	end
-end
-
-register_component(muc_domain, function(origin, stanza)
-	local to_node, to_host, to_resource = jid_split(stanza.attr.to);
-	if to_resource and not to_node then
-		if type == "error" or type == "result" then return; end
-		origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- host/resource
-	elseif to_resource then
-		handle_to_occupant(origin, stanza);
-	elseif to_node then
-		handle_to_room(origin, stanza)
-	else -- to the main muc domain
-		if type == "error" or type == "result" then return; end
-		handle_to_domain(origin, stanza);
-	end
-end);]]
-
---[[module.unload = function()
-	deregister_component(muc_domain);
-end
-module.save = function()
-	return {rooms = rooms.data; jid_nick = jid_nick.data; rooms_info = rooms_info.data; persist_list = persist_list};
-end
-module.restore = function(data)
-	rooms.data, jid_nick.data, rooms_info.data, persist_list =
-	data.rooms or {}, data.jid_nick or {}, data.rooms_info or {}, data.persist_list or {};
-end]]

mercurial