Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Half-Shot opened this issue Aug 20, 2020 · 2 comments
Open

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

Half-Shot opened this issue Aug 20, 2020 · 2 comments

Comments

@Half-Shot
Copy link
Contributor

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.

@turt2live
Copy link
Member

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

@bkil
Copy link

bkil commented Feb 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants