Diff

plugins/mod_component.lua @ 1405:19269d278c38

mod_component: Rewrite jabber:client stanzas to jabber:component:accept, thanks JaredH!
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Jun 2009 01:38:53 +0100
parent 1108:368754c54045
child 1523:841d61be198f
line wrap: on
line diff
--- a/plugins/mod_component.lua	Wed Jun 24 20:09:44 2009 +0500
+++ b/plugins/mod_component.lua	Thu Jun 25 01:38:53 2009 +0100
@@ -64,7 +64,12 @@
 	-- If component not already created for this host, create one now
 	if not hosts[session.host].connected then
 		local send = session.send;
-		session.component_session = cm_register_component(session.host, function (_, data) return send(data); end);
+		session.component_session = cm_register_component(session.host, function (_, data) 
+				if data.attr and data.attr.xmlns == "jabber:client" then
+					data.attr.xmlns = nil;
+				end
+				return send(data);
+			end);
 		hosts[session.host].connected = true;
 		log("info", "Component successfully registered");
 	else