mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Fix bot naming
This commit is contained in:
parent
01b1f2029a
commit
1765a14ac1
@ -129,9 +129,9 @@ public class BotSaveSettingsEvent extends MessageHandler {
|
||||
|
||||
case 5:
|
||||
String name = this.packet.readString();
|
||||
boolean invalidName = name.length() > BotManager.MAXIMUM_NAME_LENGTH;
|
||||
boolean invalidName = name.length() > BotManager.MAXIMUM_NAME_LENGTH || name.contains("<") || name.contains(">");
|
||||
if (!invalidName) {
|
||||
String filteredName = Emulator.getGameEnvironment().getWordFilter().filter(Jsoup.parse(name).text(), null);
|
||||
String filteredName = Emulator.getGameEnvironment().getWordFilter().filter(name, null);
|
||||
invalidName = !name.equalsIgnoreCase(filteredName);
|
||||
if (!invalidName) {
|
||||
BotSavedNameEvent nameEvent = new BotSavedNameEvent(bot, name);
|
||||
|
Loading…
Reference in New Issue
Block a user