Comparison

plugins/muc/muc.lib.lua @ 7997:aca13c433e45

MUC: Log when denying entry to locked room
author Kim Alvefur <zash@zash.se>
date Wed, 22 Mar 2017 14:13:28 +0100
parent 7684:65ba769d9f05
child 8174:260886554512
comparison
equal deleted inserted replaced
7996:f4c0fb54e16c 7997:aca13c433e45
494 self._affiliations[jid_bare(from)] = "owner"; 494 self._affiliations[jid_bare(from)] = "owner";
495 if self.locked and not stanza:get_child("x", "http://jabber.org/protocol/muc") then 495 if self.locked and not stanza:get_child("x", "http://jabber.org/protocol/muc") then
496 self.locked = nil; -- Older groupchat protocol doesn't lock 496 self.locked = nil; -- Older groupchat protocol doesn't lock
497 end 497 end
498 elseif self.locked then -- Deny entry 498 elseif self.locked then -- Deny entry
499 module:log("debug", "Room is locked, denying entry");
499 origin.send(st.error_reply(stanza, "cancel", "item-not-found")); 500 origin.send(st.error_reply(stanza, "cancel", "item-not-found"));
500 return; 501 return;
501 end 502 end
502 local affiliation = self:get_affiliation(from); 503 local affiliation = self:get_affiliation(from);
503 local role = self:get_default_role(affiliation) 504 local role = self:get_default_role(affiliation)