Software / code / prosody
Changeset
6393:fff6ca13cb0f
plugins/muc/muc.lib: Add muc-set-affiliation event
| author | daurnimator <quae@daurnimator.com> |
|---|---|
| date | Fri, 05 Sep 2014 11:28:28 -0400 |
| parents | 6392:8528d1da461f |
| children | 6394:fe034fa564ee |
| files | plugins/muc/muc.lib.lua |
| diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Fri Sep 05 11:20:54 2014 -0400 +++ b/plugins/muc/muc.lib.lua Fri Sep 05 11:28:28 2014 -0400 @@ -1049,6 +1049,17 @@ end if self.save then self:save(); end + + module:fire_event("muc-set-affiliation", { + room = self; + actor = actor; + jid = jid; + affiliation = affiliation or "none"; + reason = reason; + previous_affiliation = target_affiliation; + in_room = next(occupants_updated) ~= nil; + }); + return true; end