Reformat and clean up "net" package
This commit is contained in:
@@ -37,10 +37,10 @@ public final class MultiChatHandler extends AbstractPacketHandler {
|
||||
@Override
|
||||
public final void handlePacket(InPacket p, Client c) {
|
||||
Character player = c.getPlayer();
|
||||
if(player.getAutobanManager().getLastSpam(7) + 200 > currentServerTime()) {
|
||||
return;
|
||||
if (player.getAutobanManager().getLastSpam(7) + 200 > currentServerTime()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int type = p.readByte(); // 0 for buddys, 1 for partys
|
||||
int numRecipients = p.readByte();
|
||||
int[] recipients = new int[numRecipients];
|
||||
@@ -49,11 +49,11 @@ public final class MultiChatHandler extends AbstractPacketHandler {
|
||||
}
|
||||
String chattext = p.readString();
|
||||
if (chattext.length() > Byte.MAX_VALUE && !player.isGM()) {
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit chats.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to send text with length of " + chattext.length());
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
AutobanFactory.PACKET_EDIT.alert(c.getPlayer(), c.getPlayer().getName() + " tried to packet edit chats.");
|
||||
FilePrinter.printError(FilePrinter.EXPLOITS + c.getPlayer().getName() + ".txt", c.getPlayer().getName() + " tried to send text with length of " + chattext.length());
|
||||
c.disconnect(true, false);
|
||||
return;
|
||||
}
|
||||
World world = c.getWorldServer();
|
||||
if (type == 0) {
|
||||
world.buddyChat(recipients, player.getId(), player.getName(), chattext);
|
||||
|
||||
Reference in New Issue
Block a user