Escape section symbols so nothing freaks out

This commit is contained in:
ayunami2000 2022-07-23 21:51:10 -04:00
parent 28f4a9c406
commit 17e612a708

View File

@ -100,7 +100,7 @@ public class AuthSystem {
if (lines.length == 1 && lines[0].isEmpty()) return;
for (String line : lines) {
String[] pieces = line.split("\u0000");
cache.put(pieces[0], new AuthData(pieces[2], new HashSet<>(Arrays.asList(pieces[1].split("§")))));
cache.put(pieces[0], new AuthData(pieces[2], new HashSet<>(Arrays.asList(pieces[1].split("\u00A7")))));
}
database.clear();
@ -120,7 +120,7 @@ public class AuthSystem {
AuthData entry = database.get(username);
out.append(username);
out.append("\u0000");
out.append(String.join("§", entry.ips));
out.append(String.join("\u00A7", entry.ips));
out.append("\u0000");
out.append(entry.passHash);
out.append("\n");