# HG changeset patch # User Bjoern Kalkbrenner # Date 1279112260 -7200 # Node ID 16b76c7b6316cb2131b83b927e303dc958477d78 # Parent 35314bf3410aa3e7ca09720715e88dfe8087841c fixed broadcast PRIVMSG bug diff -r 35314bf3410a -r 16b76c7b6316 mod_ircd/mod_ircd.lua --- a/mod_ircd/mod_ircd.lua Wed Jul 14 14:27:40 2010 +0200 +++ b/mod_ircd/mod_ircd.lua Wed Jul 14 14:57:40 2010 +0200 @@ -159,10 +159,10 @@ body = body and body:get_text() or ""; local hasdelay = stanza:get_child("delay", "urn:xmpp:delay"); if body ~= "" and nick then - for session in pairs(joined_muc.sessions) do - if nick ~= session.nick or hasdelay then - session.send(":"..nick.." PRIVMSG "..from_node.." :"..body); - end + local to_nick = jid.split(stanza.attr.to); + local session = nicks[to_nick]; + if nick ~= session.nick or hasdelay then + session.send(":"..nick.." PRIVMSG "..from_node.." :"..body); end end if not nick then