plugins/muc/muc.lib.lua

changeset 1834
8e66c9d09f81
parent 1819
ed1911be26c7
child 1835
f67e4bfc62f1
--- a/plugins/muc/muc.lib.lua	Thu Sep 24 23:47:16 2009 +0100
+++ b/plugins/muc/muc.lib.lua	Fri Sep 25 12:35:09 2009 +0500
@@ -113,17 +113,8 @@
 	if code then
 		stanza:tag("status", {code=code}):up();
 	end
-	local me;
-	for occupant, o_data in pairs(self._occupants) do
-		if occupant ~= stanza.attr.from then
-			for jid in pairs(o_data.sessions) do
-				stanza.attr.to = jid;
-				self:route_stanza(stanza);
-			end
-		else
-			me = o_data;
-		end
-	end
+	self:broadcast_except_nick(stanza, stanza.attr.from);
+	local me = self._occupants[stanza.attr.from];
 	if me then
 		stanza:tag("status", {code='110'});
 		for jid in pairs(me.sessions) do

mercurial