mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2025-01-18 23:46:28 +01:00
Merge branch 'guild-name-desc' into 'dev'
Guilds name/desc length check See merge request morningstar/Arcturus-Community!270
This commit is contained in:
commit
01edb31b40
@ -25,6 +25,9 @@ public class GuildChangeNameDescEvent extends MessageHandler {
|
|||||||
if (guild.getName().equals(nameEvent.name) && guild.getDescription().equals(nameEvent.description))
|
if (guild.getName().equals(nameEvent.name) && guild.getDescription().equals(nameEvent.description))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(nameEvent.name.length() > 29 || nameEvent.description.length() > 254)
|
||||||
|
return;
|
||||||
|
|
||||||
guild.setName(nameEvent.name);
|
guild.setName(nameEvent.name);
|
||||||
guild.setDescription(nameEvent.description);
|
guild.setDescription(nameEvent.description);
|
||||||
guild.needsUpdate = true;
|
guild.needsUpdate = true;
|
||||||
|
@ -21,6 +21,12 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle() throws Exception {
|
public void handle() throws Exception {
|
||||||
|
String name = this.packet.readString();
|
||||||
|
String description = this.packet.readString();
|
||||||
|
|
||||||
|
if(name.length() > 29 || description.length() > 254)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Emulator.getConfig().getBoolean("catalog.guild.hc_required", true) && this.client.getHabbo().getHabboStats().getClubExpireTimestamp() < Emulator.getIntUnixTimestamp()) {
|
if (Emulator.getConfig().getBoolean("catalog.guild.hc_required", true) && this.client.getHabbo().getHabboStats().getClubExpireTimestamp() < Emulator.getIntUnixTimestamp()) {
|
||||||
this.client.sendResponse(new GuildEditFailComposer(GuildEditFailComposer.HC_REQUIRED));
|
this.client.sendResponse(new GuildEditFailComposer(GuildEditFailComposer.HC_REQUIRED));
|
||||||
return;
|
return;
|
||||||
@ -36,9 +42,6 @@ public class RequestGuildBuyEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = this.packet.readString();
|
|
||||||
String description = this.packet.readString();
|
|
||||||
|
|
||||||
int roomId = this.packet.readInt();
|
int roomId = this.packet.readInt();
|
||||||
|
|
||||||
Room r = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
Room r = Emulator.getGameEnvironment().getRoomManager().getRoom(roomId);
|
||||||
|
Loading…
Reference in New Issue
Block a user