raids plugin: limit layout message to 300 characters
This commit is contained in:
@@ -100,6 +100,7 @@ public class RaidsPlugin extends Plugin
|
||||
private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("###.##");
|
||||
private static final DecimalFormat POINTS_FORMAT = new DecimalFormat("#,###");
|
||||
private static final String LAYOUT_COMMAND = "!layout";
|
||||
private static final int MAX_LAYOUT_LEN = 300;
|
||||
|
||||
@Inject
|
||||
private ChatMessageManager chatMessageManager;
|
||||
@@ -637,6 +638,12 @@ public class RaidsPlugin extends Plugin
|
||||
.map(RaidRoom::getName)
|
||||
.toArray());
|
||||
|
||||
if (layoutMessage.length() > MAX_LAYOUT_LEN)
|
||||
{
|
||||
log.debug("layout message too long! {}", layoutMessage.length());
|
||||
return;
|
||||
}
|
||||
|
||||
String response = new ChatMessageBuilder()
|
||||
.append(ChatColorType.HIGHLIGHT)
|
||||
.append("Layout: ")
|
||||
|
||||
Reference in New Issue
Block a user