Ignore spaces when validating room name length on creation

This commit is contained in:
Alejandro 2020-06-07 15:07:00 +03:00
parent ed2ec3e6f3
commit 3df2f8055d

View File

@ -41,7 +41,7 @@ public class RequestCreateRoomEvent extends MessageHandler {
if (tradeType > 2)
return;
if (name.length() < 3 || name.length() > 25 || !Emulator.getGameEnvironment().getWordFilter().filter(name, this.client.getHabbo()).equals(name))
if (name.trim().length() < 3 || name.length() > 25 || !Emulator.getGameEnvironment().getWordFilter().filter(name, this.client.getHabbo()).equals(name))
return;
if (description.length() > 128 || !Emulator.getGameEnvironment().getWordFilter().filter(description, this.client.getHabbo()).equals(description))