Merge branch 'patch-2' into 'dev'

Add moto length verify (configurable from database)

See merge request morningstar/Arcturus-Community!321
This commit is contained in:
skeletor 2020-11-28 23:52:21 -05:00
commit 0760a3fd3e

View File

@ -13,9 +13,11 @@ public class SaveMottoEvent extends MessageHandler {
UserSavedMottoEvent event = new UserSavedMottoEvent(this.client.getHabbo(), this.client.getHabbo().getHabboInfo().getMotto(), motto);
Emulator.getPluginManager().fireEvent(event);
motto = event.newMotto;
this.client.getHabbo().getHabboInfo().setMotto(motto);
this.client.getHabbo().getHabboInfo().run();
if(motto.length() <= Emulator.getConfig().getInt("motto.max_length", 38)) {
this.client.getHabbo().getHabboInfo().setMotto(motto);
this.client.getHabbo().getHabboInfo().run();
}
if (this.client.getHabbo().getHabboInfo().getCurrentRoom() != null) {
this.client.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserDataComposer(this.client.getHabbo()).compose());