mjolnir
mjolnir copied to clipboard
The bot should reject incorrect userIds rather than no-oping.
Currently doing a:
!mjolnir ban @[email protected]
will succeed with a green checkmark, because it technically didn't find any users with that user_id.
We shouldn't be too strict because not all bots and bridges follow the user_id schema (looking at you, IRC bridge), but basic checks to ensure it starts with an @
and has a :
in the middle would catch simple typos.
It can't tell the difference between this and a glob, and generally does not try to protect you from yourself for intentional reasons.
It might be a useful diagnostic to ask for confirmation and/or just send a warning if a new ban rule glob does not match anything in any of the protected rooms.
This may be intentional (like when you see an abuser in a room that you do not control), but more often than not, it's just a typo and/or the result of not knowing the syntax well enough.
Somewhat related: #228