Narrowed the IP address spam filter.
This will be easy to work around, but fewer false positives. GP's mute style should minimize effort going into workarounds anyway.
This commit is contained in:
parent
87ae5b2caf
commit
6568e41b60
|
|
@ -227,7 +227,7 @@ class PlayerEventHandler implements Listener
|
||||||
//filter IP addresses
|
//filter IP addresses
|
||||||
if(!muted)
|
if(!muted)
|
||||||
{
|
{
|
||||||
Pattern ipAddressPattern = Pattern.compile("\\d{1,4}\\D{1,3}\\d{1,4}\\D{1,3}\\d{1,4}\\D{1,3}\\d{1,4}");
|
Pattern ipAddressPattern = Pattern.compile("([0-9]{1,3}\\.){3}[0-9]{1,3}");
|
||||||
Matcher matcher = ipAddressPattern.matcher(message);
|
Matcher matcher = ipAddressPattern.matcher(message);
|
||||||
|
|
||||||
//if it looks like an IP address
|
//if it looks like an IP address
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user