matrix-org / mjolnir

A moderation tool for Matrix
Apache License 2.0
328 stars 55 forks source link

Don't attempt to ban/kick Admins (or people with the same or above powerlevel than the bot) #396

Closed ghost closed 1 month ago

ghost commented 2 years ago

Mjolnir currently tries to ban or kick Admins or people with the same PL as the bot, this results in an error and some spam in the coordination room, therefore, I believe that mjolnir should first check if it's capable of banning/kicking the user or not instead of just trying without any checks.

This also happens on other circumstances, when mjolnir tries setting a room ACL when it can't because it doesn't have enough permission.

This could be split into another issue called (Mjolnir should check if it can perform an action before commiting to it).

bkil commented 2 years ago

Related: #115 #240

turt2live commented 1 month ago

I'm considering this a loose duplicate of https://github.com/matrix-org/mjolnir/issues/45