Add bot motto max length to match user

This commit is contained in:
Bill 2022-03-23 04:43:39 -04:00
parent e304ba1ecb
commit 208c07a809

View File

@ -152,7 +152,11 @@ public class BotSaveSettingsEvent extends MessageHandler {
} }
break; break;
case 9: 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); bot.needsUpdate(true);
room.sendComposer(new RoomUsersComposer(bot).compose()); room.sendComposer(new RoomUsersComposer(bot).compose());
break; break;