mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Checks the length of name and description for guilds/groups
This commit is contained in:
parent
cfcc2d0f7c
commit
f1ada781d7
@ -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