mjolnir icon indicating copy to clipboard operation
mjolnir copied to clipboard

The bot should reject incorrect userIds rather than no-oping.

Open Half-Shot opened this issue 4 years ago • 2 comments

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.

Half-Shot avatar Aug 20 '20 15:08 Half-Shot

It can't tell the difference between this and a glob, and generally does not try to protect you from yourself for intentional reasons.

turt2live avatar Aug 20 '20 16:08 turt2live

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

bkil avatar Feb 21 '22 14:02 bkil