diff --git a/server/src/org/moparforia/server/net/packethandlers/golf/TrackTestLoginHandler.java b/server/src/org/moparforia/server/net/packethandlers/golf/TrackTestLoginHandler.java index 02096a44..82da1f77 100644 --- a/server/src/org/moparforia/server/net/packethandlers/golf/TrackTestLoginHandler.java +++ b/server/src/org/moparforia/server/net/packethandlers/golf/TrackTestLoginHandler.java @@ -44,7 +44,10 @@ public boolean handle(Server server, Packet packet, Matcher message) { boolean anonym = true; //!Database.getInstance().authenticateUser(username,password); if (anonym) { - username = "~anonym-" + (int) (Math.random() * 10000); + if (username.length() == 0) { + username = "~anonym-" + (int) (Math.random() * 10000); + // Warning: Currently duplicates wont get noticed... + } } Player player = (Player) packet.getChannel().getAttachment();