Soften server checking regex - also towards #143

This commit is contained in:
Luck 2017-01-22 16:36:06 +00:00
parent 0be7300677
commit 38d1c9974b
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -45,7 +45,7 @@ public class ArgumentChecker {
}
public static boolean checkServer(String s) {
return s.toLowerCase().startsWith("r=") || (s.startsWith("(") && s.endsWith(")") && s.contains("|")) || Patterns.NON_ALPHA_NUMERIC.matcher(s).find();
return !s.toLowerCase().startsWith("r=") && Patterns.NON_ALPHA_NUMERIC_SPACE.matcher(s).find();
}
public static boolean checkNode(String s) {