Software /
code /
prosody
Comparison
plugins/muc/util.lib.lua @ 9600:ae0aca2c0ebb
Merge 0.11->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 31 Oct 2018 13:17:02 +0000 |
parent | 9599:5a2135964ed3 |
child | 9603:4897bd63f624 |
comparison
equal
deleted
inserted
replaced
9598:dcd85bc34d21 | 9600:ae0aca2c0ebb |
---|---|
53 end | 53 end |
54 function _M.filter_muc_x(stanza) | 54 function _M.filter_muc_x(stanza) |
55 return stanza:maptags(muc_x_filter); | 55 return stanza:maptags(muc_x_filter); |
56 end | 56 end |
57 | 57 |
58 function _M.only_with_min_role(role) | |
59 local min_role_value = _M.valid_roles[role]; | |
60 return function (nick, occupant) | |
61 if _M.valid_roles[occupant.role or "none"] >= min_role_value then | |
62 return true; | |
63 end | |
64 end; | |
65 end | |
66 | |
58 return _M; | 67 return _M; |