mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-23 15:20:52 +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:
|
case 5:
|
||||||
String name = this.packet.readString();
|
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) {
|
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);
|
invalidName = !name.equalsIgnoreCase(filteredName);
|
||||||
if (!invalidName) {
|
if (!invalidName) {
|
||||||
BotSavedNameEvent nameEvent = new BotSavedNameEvent(bot, name);
|
BotSavedNameEvent nameEvent = new BotSavedNameEvent(bot, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user