Fix sorting of users in /who

This commit is contained in:
snowleo 2011-12-11 09:22:27 +01:00
parent a63c116590
commit f8e1f02523
5 changed files with 19 additions and 9 deletions

View file

@ -477,4 +477,15 @@ public class Util
}
return buf.toString();
}
private static transient final Pattern COLOR_PATTERN = Pattern.compile("(?i)\u00A7[0-9A-F]");
public static String stripColor(final String input)
{
if (input == null)
{
return null;
}
return COLOR_PATTERN.matcher(input).replaceAll("");
}
}