Regex for the obsuring of console info
AutonomousCat opened this issue ยท 4 comments
Why?
I currently have the Discord minecraft console channel viewable by admins only because I don't want to expose people's IPs to moderators who might not be a good fit in the end. It would be a nice solution to be able to filter IP addresses using regex (since there are multiple areas where someone's IP might be shown, for example in player-joins, as well as plugin output (ie whois).
What and How?
It should behave the same, unless regex the regex setting is enabled.
Maybe it can work something like:
{
"regex_here1": "replaced_by1",
"regex_here2": "replaced_by2",
}
Are there alternatives?
Unsure
Checks
- I have used the search at least once to check if my idea has already been suggested and perhaps already implemented.
Anything else
No response
Oh dang thank you. Any personal recs for IP regex? I found this online somewhere
(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
I also see that it's recommended by Java devs to use the a built in Java utility for that . Maybe this can be it's own separate thing? Especially since the answers found for "IP regex" will vary so not everybody will get the same experience.
Regex works fine for IP addresses, ask in our Discord server if you need help setting up filters: https://discordsrv.com/discord