# HG changeset patch # User Waqas Hussain # Date 1273768090 -18000 # Node ID 5abf15351b9a5c862edc0c32f3c245f7ed2e0c26 # Parent fd7f7ebf257efb09f7234190d6e058c525473050 mod_ircd: Fixed handling of empty elements. diff -r fd7f7ebf257e -r 5abf15351b9a mod_ircd/mod_ircd.lua --- a/mod_ircd/mod_ircd.lua Thu May 13 14:45:10 2010 +0500 +++ b/mod_ircd/mod_ircd.lua Thu May 13 21:28:10 2010 +0500 @@ -122,10 +122,10 @@ local joined_muc = joined_mucs[from_node]; if stanza.name == "message" then local subject = stanza:get_child("subject"); + subject = subject and (subject:get_text() or ""); if subject then - local subject_text = subject:get_text(); for session in pairs(joined_muc.sessions) do - session.send(":"..session.host.." 332 "..session.nick.." "..from_node.." :"..subject_text); + session.send(":"..session.host.." 332 "..session.nick.." "..from_node.." :"..subject); end end end