Moderator rights based on group membership

Hello,

i have set up an own server with secure domain. So every User has to login and then the first one gets admin rights.
What i need to achieve is, that people from group A are moderators, people from group B are normal users.
Only moderators should be able to create rooms, users should wait or immediately be kicked out, if there is not moderator present in that room.

I did some search, but didnt succeed to find a ready to use solution. Do you know a config to do that?

I think i have to write a lua script and use the hooks to code a solution.
Can you provide me some links with good starting points?
explanation of lua scripting?
hook overview, which are existing in stable versions (e.g. 0.10 prosody)?
is there already a storage like memcached where i could store the group information of a user?

1 Like

I am still searching for hints for e.g. the list of these hooks: module:hook(“muc-room-pre-create” …

Here is an example

Mind that some events are not present on 0.10.
You can add a variable in the module to store data in the memory of prosody … will be cleared once it reatarts. And make sure you clean your storage so you don’t leak memory

1 Like