Commands overhaul + Selective loot + Antimulticlient Coordinator
Completely overhauled commands layout, each command splitted in Java classes. Optimized "ranks" command, no more calling the DB to get ranking info. Implemented a mechanic where mobs only spawns loots that are visible/collectable by the player's party. Implemented a server flag which sets whether explorers, cygnus and legends are allowed to share the cash shop inventory or not. Implemented support for dynamic server rates at bootup. Rates can now be assigned at the configuration.ini file. Devised the anti-multiclient login coordinator feature. Besides multiclient attempts by the same machine, it also prevents unauthorized login attempts into an account. Fixed PQ instances being forcefully closed even when party leader reassignment upon logout is available. Fixed mob statis not concurrently protected.
This commit is contained in:
@@ -24,23 +24,13 @@ package net.server.channel.handlers;
|
||||
import client.MapleCharacter;
|
||||
import client.MapleClient;
|
||||
import client.autoban.AutobanFactory;
|
||||
import client.command.Commands;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import client.command.CommandsExecutor;
|
||||
import net.AbstractMaplePacketHandler;
|
||||
import tools.FilePrinter;
|
||||
import tools.MaplePacketCreator;
|
||||
import tools.data.input.SeekableLittleEndianAccessor;
|
||||
|
||||
public final class GeneralChatHandler extends AbstractMaplePacketHandler {
|
||||
private static boolean isCommandIssue(char heading, MapleCharacter chr) {
|
||||
if(chr.gmLevel() > 1 && heading == '!') {
|
||||
return true;
|
||||
} else {
|
||||
return heading == '@';
|
||||
}
|
||||
}
|
||||
|
||||
public final class GeneralChatHandler extends AbstractMaplePacketHandler {
|
||||
@Override
|
||||
public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) {
|
||||
String s = slea.readMapleAsciiString();
|
||||
@@ -56,19 +46,8 @@ public final class GeneralChatHandler extends AbstractMaplePacketHandler {
|
||||
return;
|
||||
}
|
||||
char heading = s.charAt(0);
|
||||
if (isCommandIssue(heading, chr)) {
|
||||
String[] sp = s.split(" ");
|
||||
sp[0] = sp[0].toLowerCase().substring(1);
|
||||
|
||||
if(Commands.executeHeavenMsPlayerCommand(c, sp, heading)) {
|
||||
String command = "";
|
||||
for (String used : sp) {
|
||||
command += used + " ";
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
||||
FilePrinter.print(FilePrinter.USED_COMMANDS, c.getPlayer().getName() + " used: " + heading + command + "on " + sdf.format(Calendar.getInstance().getTime()) + "\r\n");
|
||||
}
|
||||
if (CommandsExecutor.isCommand(c, s)) {
|
||||
CommandsExecutor.getInstance().handle(c, s);
|
||||
} else if (heading != '/') {
|
||||
int show = slea.readByte();
|
||||
if(chr.getMap().isMuted() && !chr.isGM()) {
|
||||
@@ -85,4 +64,4 @@ public final class GeneralChatHandler extends AbstractMaplePacketHandler {
|
||||
chr.getAutobanManager().spam(7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user