Comparison

mod_compat_muc_admin/mod_compat_muc_admin.lua @ 631:c9084b4c14f0

mod_compat_muc_admin: corrected variable leftovers.
author Marco Cirillo <maranda@lightwitch.org>
date Tue, 27 Mar 2012 17:11:26 +0000
parent 630:ab2a1564da9b
child 731:15a8b717597b
comparison
equal deleted inserted replaced
630:ab2a1564da9b 631:c9084b4c14f0
146 if self:get_affiliation(stanza.attr.from) ~= "owner" then 146 if self:get_affiliation(stanza.attr.from) ~= "owner" then
147 origin.send(owner_err); 147 origin.send(owner_err);
148 else self:process_form(origin, stanza); end 148 else self:process_form(origin, stanza); end
149 elseif stanza.tags[1].tags[1].name == "destroy" then 149 elseif stanza.tags[1].tags[1].name == "destroy" then
150 if self:get_affiliation(stanza.attr.from) == "owner" then 150 if self:get_affiliation(stanza.attr.from) == "owner" then
151 local newjid = child.attr.jid; 151 local newjid = stanza.tags[1].tags[1].attr.jid;
152 local reason, password; 152 local reason, password;
153 for _,tag in ipairs(child.tags) do 153 for _,tag in ipairs(stanza.tags[1].tags[1].tags) do
154 if tag.name == "reason" then 154 if tag.name == "reason" then
155 reason = #tag.tags == 0 and tag[1]; 155 reason = #tag.tags == 0 and tag[1];
156 elseif tag.name == "password" then 156 elseif tag.name == "password" then
157 password = #tag.tags == 0 and tag[1]; 157 password = #tag.tags == 0 and tag[1];
158 end 158 end