From 208c07a809701c167b1df10f9984ad35fae72b11 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 23 Mar 2022 04:43:39 -0400 Subject: [PATCH] Add bot motto max length to match user --- .../messages/incoming/rooms/bots/BotSaveSettingsEvent.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/messages/incoming/rooms/bots/BotSaveSettingsEvent.java b/src/main/java/com/eu/habbo/messages/incoming/rooms/bots/BotSaveSettingsEvent.java index 2d217924..bb5da19d 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/rooms/bots/BotSaveSettingsEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/rooms/bots/BotSaveSettingsEvent.java @@ -152,7 +152,11 @@ public class BotSaveSettingsEvent extends MessageHandler { } break; case 9: - bot.setMotto(this.packet.readString()); + String motto = this.packet.readString(); + + if(motto.length() > Emulator.getConfig().getInt("motto.max_length", 38)) break; + + bot.setMotto(motto); bot.needsUpdate(true); room.sendComposer(new RoomUsersComposer(bot).compose()); break;