Software /
code /
prosody
Comparison
plugins/muc/muc.lib.lua @ 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 |
parent | 6392:8528d1da461f |
child | 6394:fe034fa564ee |
comparison
equal
deleted
inserted
replaced
6392:8528d1da461f | 6393:fff6ca13cb0f |
---|---|
1047 end | 1047 end |
1048 end | 1048 end |
1049 end | 1049 end |
1050 | 1050 |
1051 if self.save then self:save(); end | 1051 if self.save then self:save(); end |
1052 | |
1053 module:fire_event("muc-set-affiliation", { | |
1054 room = self; | |
1055 actor = actor; | |
1056 jid = jid; | |
1057 affiliation = affiliation or "none"; | |
1058 reason = reason; | |
1059 previous_affiliation = target_affiliation; | |
1060 in_room = next(occupants_updated) ~= nil; | |
1061 }); | |
1062 | |
1052 return true; | 1063 return true; |
1053 end | 1064 end |
1054 | 1065 |
1055 function room_mt:get_role(nick) | 1066 function room_mt:get_role(nick) |
1056 local occupant = self:get_occupant_by_nick(nick); | 1067 local occupant = self:get_occupant_by_nick(nick); |