Load Telnet handlers only if it is enabled.

This commit is contained in:
MobiusDev
2017-08-07 13:37:58 +00:00
parent f175464185
commit bb578cfee8
78 changed files with 162 additions and 702 deletions

View File

@@ -39,6 +39,7 @@ import com.l2jmobius.gameserver.handler.PunishmentHandler;
import com.l2jmobius.gameserver.handler.TargetHandler; import com.l2jmobius.gameserver.handler.TargetHandler;
import com.l2jmobius.gameserver.handler.UserCommandHandler; import com.l2jmobius.gameserver.handler.UserCommandHandler;
import com.l2jmobius.gameserver.handler.VoicedCommandHandler; import com.l2jmobius.gameserver.handler.VoicedCommandHandler;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import handlers.actionhandlers.L2ArtefactInstanceAction; import handlers.actionhandlers.L2ArtefactInstanceAction;
import handlers.actionhandlers.L2DecoyAction; import handlers.actionhandlers.L2DecoyAction;
@@ -284,6 +285,30 @@ import handlers.targethandlers.affectscope.Square;
import handlers.targethandlers.affectscope.SquarePB; import handlers.targethandlers.affectscope.SquarePB;
import handlers.targethandlers.affectscope.StaticObjectScope; import handlers.targethandlers.affectscope.StaticObjectScope;
import handlers.targethandlers.affectscope.SummonExceptMaster; import handlers.targethandlers.affectscope.SummonExceptMaster;
import handlers.telnethandlers.chat.Announce;
import handlers.telnethandlers.chat.GMChat;
import handlers.telnethandlers.chat.Msg;
import handlers.telnethandlers.player.AccessLevel;
import handlers.telnethandlers.player.Ban;
import handlers.telnethandlers.player.BanChat;
import handlers.telnethandlers.player.Enchant;
import handlers.telnethandlers.player.GMList;
import handlers.telnethandlers.player.Give;
import handlers.telnethandlers.player.Jail;
import handlers.telnethandlers.player.Kick;
import handlers.telnethandlers.player.Unban;
import handlers.telnethandlers.player.UnbanChat;
import handlers.telnethandlers.player.Unjail;
import handlers.telnethandlers.server.ForceGC;
import handlers.telnethandlers.server.Memusage;
import handlers.telnethandlers.server.Performance;
import handlers.telnethandlers.server.Purge;
import handlers.telnethandlers.server.Reload;
import handlers.telnethandlers.server.ServerAbort;
import handlers.telnethandlers.server.ServerRestart;
import handlers.telnethandlers.server.ServerShutdown;
import handlers.telnethandlers.server.Status;
import handlers.telnethandlers.server.ThreadPoolDebug;
import handlers.usercommandhandlers.ChannelDelete; import handlers.usercommandhandlers.ChannelDelete;
import handlers.usercommandhandlers.ChannelInfo; import handlers.usercommandhandlers.ChannelInfo;
import handlers.usercommandhandlers.ChannelLeave; import handlers.usercommandhandlers.ChannelLeave;
@@ -699,6 +724,35 @@ public class MasterHandler
} }
} }
if (Config.TELNET_ENABLED)
{
TelnetServer.getInstance().addHandler(new Announce());
TelnetServer.getInstance().addHandler(new GMChat());
TelnetServer.getInstance().addHandler(new Msg());
TelnetServer.getInstance().addHandler(new AccessLevel());
TelnetServer.getInstance().addHandler(new Ban());
TelnetServer.getInstance().addHandler(new BanChat());
TelnetServer.getInstance().addHandler(new Enchant());
TelnetServer.getInstance().addHandler(new Give());
TelnetServer.getInstance().addHandler(new GMList());
TelnetServer.getInstance().addHandler(new Jail());
TelnetServer.getInstance().addHandler(new Kick());
TelnetServer.getInstance().addHandler(new Unban());
TelnetServer.getInstance().addHandler(new UnbanChat());
TelnetServer.getInstance().addHandler(new Unjail());
TelnetServer.getInstance().addHandler(new ForceGC());
TelnetServer.getInstance().addHandler(new Memusage());
TelnetServer.getInstance().addHandler(new Performance());
TelnetServer.getInstance().addHandler(new Purge());
TelnetServer.getInstance().addHandler(new Reload());
TelnetServer.getInstance().addHandler(new ServerAbort());
TelnetServer.getInstance().addHandler(new ServerRestart());
TelnetServer.getInstance().addHandler(new ServerShutdown());
TelnetServer.getInstance().addHandler(new Status());
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
TelnetServer.getInstance().addHandler(new handlers.telnethandlers.server.Debug());
}
for (IHandler<?, ?> loadInstance : LOAD_INSTANCES) for (IHandler<?, ?> loadInstance : LOAD_INSTANCES)
{ {
_log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers"); _log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers");

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.chat; package handlers.telnethandlers.chat;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Broadcast;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Announce implements ITelnetCommand public class Announce implements ITelnetCommand
{ {
private Announce()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -58,9 +53,4 @@ public class Announce implements ITelnetCommand
Broadcast.toAllOnlinePlayers(sb.toString()); Broadcast.toAllOnlinePlayers(sb.toString());
return "Announcement sent!"; return "Announcement sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Announce());
}
} }

View File

@@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMChat implements ITelnetCommand public class GMChat implements ITelnetCommand
{ {
private GMChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMChat implements ITelnetCommand
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString())); AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
return "GMChat sent!"; return "GMChat sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -30,10 +29,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Msg implements ITelnetCommand public class Msg implements ITelnetCommand
{ {
private Msg()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -66,9 +61,4 @@ public class Msg implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Msg());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class AccessLevel implements ITelnetCommand public class AccessLevel implements ITelnetCommand
{ {
private AccessLevel()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -61,9 +56,4 @@ public class AccessLevel implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new AccessLevel());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Ban implements ITelnetCommand public class Ban implements ITelnetCommand
{ {
private Ban()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Ban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Ban());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class BanChat implements ITelnetCommand public class BanChat implements ITelnetCommand
{ {
private BanChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class BanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new BanChat());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.GMAudit; import com.l2jmobius.gameserver.util.GMAudit;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -33,10 +32,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Enchant implements ITelnetCommand public class Enchant implements ITelnetCommand
{ {
private Enchant()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -168,9 +163,4 @@ public class Enchant implements ITelnetCommand
} }
return false; return false;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Enchant());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMList implements ITelnetCommand public class GMList implements ITelnetCommand
{ {
private GMList()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMList implements ITelnetCommand
} }
return "There are currently " + i + " GM(s) online..." + Config.EOL + gms; return "There are currently " + i + " GM(s) online..." + Config.EOL + gms;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMList());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -31,10 +30,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Give implements ITelnetCommand public class Give implements ITelnetCommand
{ {
private Give()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -87,9 +82,4 @@ public class Give implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Give());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Jail implements ITelnetCommand public class Jail implements ITelnetCommand
{ {
private Jail()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Jail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Jail());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Kick implements ITelnetCommand public class Kick implements ITelnetCommand
{ {
private Kick()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -59,9 +54,4 @@ public class Kick implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Kick());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unban());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class UnbanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new UnbanChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unjail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unjail());
}
} }

View File

@@ -48,7 +48,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket; import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.taskmanager.DecayTaskManager; import com.l2jmobius.gameserver.taskmanager.DecayTaskManager;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -60,10 +59,6 @@ public class Debug implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Debug.class.getName()); private static final Logger LOGGER = Logger.getLogger(Debug.class.getName());
private Debug()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -461,9 +456,4 @@ public class Debug implements ITelnetCommand
cal.set(Calendar.MINUTE, m); cal.set(Calendar.MINUTE, m);
return format.format(cal.getTime()); return format.format(cal.getTime());
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Debug());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ForceGC implements ITelnetCommand public class ForceGC implements ITelnetCommand
{ {
private ForceGC()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -48,9 +43,4 @@ public class ForceGC implements ITelnetCommand
System.gc(); System.gc();
return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576); return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576);
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ForceGC());
}
} }

View File

@@ -20,7 +20,6 @@ import java.text.DecimalFormat;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Memusage implements ITelnetCommand public class Memusage implements ITelnetCommand
{ {
private Memusage()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -74,9 +69,4 @@ public class Memusage implements ITelnetCommand
sb.append("+----" + Config.EOL); sb.append("+----" + Config.EOL);
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Memusage());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Performance implements ITelnetCommand public class Performance implements ITelnetCommand
{ {
private Performance()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Performance implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Performance());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Purge implements ITelnetCommand public class Purge implements ITelnetCommand
{ {
private Purge()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Purge implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Purge());
}
} }

View File

@@ -46,7 +46,6 @@ import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.instancemanager.WalkingManager; import com.l2jmobius.gameserver.instancemanager.WalkingManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.scripting.ScriptEngineManager; import com.l2jmobius.gameserver.scripting.ScriptEngineManager;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -59,10 +58,6 @@ public class Reload implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Reload.class.getName()); private static final Logger LOGGER = Logger.getLogger(Reload.class.getName());
private Reload()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -266,9 +261,4 @@ public class Reload implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Reload());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerAbort implements ITelnetCommand public class ServerAbort implements ITelnetCommand
{ {
private ServerAbort()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -49,9 +44,4 @@ public class ServerAbort implements ITelnetCommand
Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString()); Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString());
return "Server shutdown/restart aborted!"; return "Server shutdown/restart aborted!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerAbort());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerRestart implements ITelnetCommand public class ServerRestart implements ITelnetCommand
{ {
private ServerRestart()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerRestart implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true);
return "Server will restart in " + time + " seconds!"; return "Server will restart in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerRestart());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerShutdown implements ITelnetCommand public class ServerShutdown implements ITelnetCommand
{ {
private ServerShutdown()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerShutdown implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false);
return "Server will shutdown in " + time + " seconds!"; return "Server will shutdown in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerShutdown());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Status implements ITelnetCommand public class Status implements ITelnetCommand
{ {
private Status()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -47,9 +42,4 @@ public class Status implements ITelnetCommand
{ {
return Debug.getServerStatus(); return Debug.getServerStatus();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Status());
}
} }

View File

@@ -30,7 +30,6 @@ import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper; import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -169,9 +168,4 @@ public class ThreadPoolDebug implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
}
} }

View File

@@ -39,6 +39,7 @@ import com.l2jmobius.gameserver.handler.PunishmentHandler;
import com.l2jmobius.gameserver.handler.TargetHandler; import com.l2jmobius.gameserver.handler.TargetHandler;
import com.l2jmobius.gameserver.handler.UserCommandHandler; import com.l2jmobius.gameserver.handler.UserCommandHandler;
import com.l2jmobius.gameserver.handler.VoicedCommandHandler; import com.l2jmobius.gameserver.handler.VoicedCommandHandler;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import handlers.actionhandlers.L2ArtefactInstanceAction; import handlers.actionhandlers.L2ArtefactInstanceAction;
import handlers.actionhandlers.L2DecoyAction; import handlers.actionhandlers.L2DecoyAction;
@@ -283,6 +284,30 @@ import handlers.targethandlers.affectscope.Square;
import handlers.targethandlers.affectscope.SquarePB; import handlers.targethandlers.affectscope.SquarePB;
import handlers.targethandlers.affectscope.StaticObjectScope; import handlers.targethandlers.affectscope.StaticObjectScope;
import handlers.targethandlers.affectscope.SummonExceptMaster; import handlers.targethandlers.affectscope.SummonExceptMaster;
import handlers.telnethandlers.chat.Announce;
import handlers.telnethandlers.chat.GMChat;
import handlers.telnethandlers.chat.Msg;
import handlers.telnethandlers.player.AccessLevel;
import handlers.telnethandlers.player.Ban;
import handlers.telnethandlers.player.BanChat;
import handlers.telnethandlers.player.Enchant;
import handlers.telnethandlers.player.GMList;
import handlers.telnethandlers.player.Give;
import handlers.telnethandlers.player.Jail;
import handlers.telnethandlers.player.Kick;
import handlers.telnethandlers.player.Unban;
import handlers.telnethandlers.player.UnbanChat;
import handlers.telnethandlers.player.Unjail;
import handlers.telnethandlers.server.ForceGC;
import handlers.telnethandlers.server.Memusage;
import handlers.telnethandlers.server.Performance;
import handlers.telnethandlers.server.Purge;
import handlers.telnethandlers.server.Reload;
import handlers.telnethandlers.server.ServerAbort;
import handlers.telnethandlers.server.ServerRestart;
import handlers.telnethandlers.server.ServerShutdown;
import handlers.telnethandlers.server.Status;
import handlers.telnethandlers.server.ThreadPoolDebug;
import handlers.usercommandhandlers.ChannelDelete; import handlers.usercommandhandlers.ChannelDelete;
import handlers.usercommandhandlers.ChannelInfo; import handlers.usercommandhandlers.ChannelInfo;
import handlers.usercommandhandlers.ChannelLeave; import handlers.usercommandhandlers.ChannelLeave;
@@ -697,6 +722,35 @@ public class MasterHandler
} }
} }
if (Config.TELNET_ENABLED)
{
TelnetServer.getInstance().addHandler(new Announce());
TelnetServer.getInstance().addHandler(new GMChat());
TelnetServer.getInstance().addHandler(new Msg());
TelnetServer.getInstance().addHandler(new AccessLevel());
TelnetServer.getInstance().addHandler(new Ban());
TelnetServer.getInstance().addHandler(new BanChat());
TelnetServer.getInstance().addHandler(new Enchant());
TelnetServer.getInstance().addHandler(new Give());
TelnetServer.getInstance().addHandler(new GMList());
TelnetServer.getInstance().addHandler(new Jail());
TelnetServer.getInstance().addHandler(new Kick());
TelnetServer.getInstance().addHandler(new Unban());
TelnetServer.getInstance().addHandler(new UnbanChat());
TelnetServer.getInstance().addHandler(new Unjail());
TelnetServer.getInstance().addHandler(new ForceGC());
TelnetServer.getInstance().addHandler(new Memusage());
TelnetServer.getInstance().addHandler(new Performance());
TelnetServer.getInstance().addHandler(new Purge());
TelnetServer.getInstance().addHandler(new Reload());
TelnetServer.getInstance().addHandler(new ServerAbort());
TelnetServer.getInstance().addHandler(new ServerRestart());
TelnetServer.getInstance().addHandler(new ServerShutdown());
TelnetServer.getInstance().addHandler(new Status());
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
TelnetServer.getInstance().addHandler(new handlers.telnethandlers.server.Debug());
}
for (IHandler<?, ?> loadInstance : LOAD_INSTANCES) for (IHandler<?, ?> loadInstance : LOAD_INSTANCES)
{ {
_log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers"); _log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers");

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.chat; package handlers.telnethandlers.chat;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Broadcast;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Announce implements ITelnetCommand public class Announce implements ITelnetCommand
{ {
private Announce()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -58,9 +53,4 @@ public class Announce implements ITelnetCommand
Broadcast.toAllOnlinePlayers(sb.toString()); Broadcast.toAllOnlinePlayers(sb.toString());
return "Announcement sent!"; return "Announcement sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Announce());
}
} }

View File

@@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMChat implements ITelnetCommand public class GMChat implements ITelnetCommand
{ {
private GMChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMChat implements ITelnetCommand
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString())); AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
return "GMChat sent!"; return "GMChat sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -30,10 +29,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Msg implements ITelnetCommand public class Msg implements ITelnetCommand
{ {
private Msg()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -66,9 +61,4 @@ public class Msg implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Msg());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class AccessLevel implements ITelnetCommand public class AccessLevel implements ITelnetCommand
{ {
private AccessLevel()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -61,9 +56,4 @@ public class AccessLevel implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new AccessLevel());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Ban implements ITelnetCommand public class Ban implements ITelnetCommand
{ {
private Ban()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Ban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Ban());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class BanChat implements ITelnetCommand public class BanChat implements ITelnetCommand
{ {
private BanChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class BanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new BanChat());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.GMAudit; import com.l2jmobius.gameserver.util.GMAudit;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -33,10 +32,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Enchant implements ITelnetCommand public class Enchant implements ITelnetCommand
{ {
private Enchant()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -168,9 +163,4 @@ public class Enchant implements ITelnetCommand
} }
return false; return false;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Enchant());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMList implements ITelnetCommand public class GMList implements ITelnetCommand
{ {
private GMList()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMList implements ITelnetCommand
} }
return "There are currently " + i + " GM(s) online..." + Config.EOL + gms; return "There are currently " + i + " GM(s) online..." + Config.EOL + gms;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMList());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -31,10 +30,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Give implements ITelnetCommand public class Give implements ITelnetCommand
{ {
private Give()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -87,9 +82,4 @@ public class Give implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Give());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Jail implements ITelnetCommand public class Jail implements ITelnetCommand
{ {
private Jail()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Jail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Jail());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Kick implements ITelnetCommand public class Kick implements ITelnetCommand
{ {
private Kick()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -59,9 +54,4 @@ public class Kick implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Kick());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unban());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class UnbanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new UnbanChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unjail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unjail());
}
} }

View File

@@ -48,7 +48,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket; import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.taskmanager.DecayTaskManager; import com.l2jmobius.gameserver.taskmanager.DecayTaskManager;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -60,10 +59,6 @@ public class Debug implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Debug.class.getName()); private static final Logger LOGGER = Logger.getLogger(Debug.class.getName());
private Debug()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -461,9 +456,4 @@ public class Debug implements ITelnetCommand
cal.set(Calendar.MINUTE, m); cal.set(Calendar.MINUTE, m);
return format.format(cal.getTime()); return format.format(cal.getTime());
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Debug());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ForceGC implements ITelnetCommand public class ForceGC implements ITelnetCommand
{ {
private ForceGC()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -48,9 +43,4 @@ public class ForceGC implements ITelnetCommand
System.gc(); System.gc();
return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576); return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576);
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ForceGC());
}
} }

View File

@@ -20,7 +20,6 @@ import java.text.DecimalFormat;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Memusage implements ITelnetCommand public class Memusage implements ITelnetCommand
{ {
private Memusage()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -74,9 +69,4 @@ public class Memusage implements ITelnetCommand
sb.append("+----" + Config.EOL); sb.append("+----" + Config.EOL);
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Memusage());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Performance implements ITelnetCommand public class Performance implements ITelnetCommand
{ {
private Performance()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Performance implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Performance());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Purge implements ITelnetCommand public class Purge implements ITelnetCommand
{ {
private Purge()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Purge implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Purge());
}
} }

View File

@@ -46,7 +46,6 @@ import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.instancemanager.WalkingManager; import com.l2jmobius.gameserver.instancemanager.WalkingManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.scripting.ScriptEngineManager; import com.l2jmobius.gameserver.scripting.ScriptEngineManager;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -59,10 +58,6 @@ public class Reload implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Reload.class.getName()); private static final Logger LOGGER = Logger.getLogger(Reload.class.getName());
private Reload()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -266,9 +261,4 @@ public class Reload implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Reload());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerAbort implements ITelnetCommand public class ServerAbort implements ITelnetCommand
{ {
private ServerAbort()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -49,9 +44,4 @@ public class ServerAbort implements ITelnetCommand
Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString()); Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString());
return "Server shutdown/restart aborted!"; return "Server shutdown/restart aborted!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerAbort());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerRestart implements ITelnetCommand public class ServerRestart implements ITelnetCommand
{ {
private ServerRestart()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerRestart implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true);
return "Server will restart in " + time + " seconds!"; return "Server will restart in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerRestart());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerShutdown implements ITelnetCommand public class ServerShutdown implements ITelnetCommand
{ {
private ServerShutdown()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerShutdown implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false);
return "Server will shutdown in " + time + " seconds!"; return "Server will shutdown in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerShutdown());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Status implements ITelnetCommand public class Status implements ITelnetCommand
{ {
private Status()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -47,9 +42,4 @@ public class Status implements ITelnetCommand
{ {
return Debug.getServerStatus(); return Debug.getServerStatus();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Status());
}
} }

View File

@@ -30,7 +30,6 @@ import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper; import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -169,9 +168,4 @@ public class ThreadPoolDebug implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
}
} }

View File

@@ -39,6 +39,7 @@ import com.l2jmobius.gameserver.handler.PunishmentHandler;
import com.l2jmobius.gameserver.handler.TargetHandler; import com.l2jmobius.gameserver.handler.TargetHandler;
import com.l2jmobius.gameserver.handler.UserCommandHandler; import com.l2jmobius.gameserver.handler.UserCommandHandler;
import com.l2jmobius.gameserver.handler.VoicedCommandHandler; import com.l2jmobius.gameserver.handler.VoicedCommandHandler;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import handlers.actionhandlers.L2ArtefactInstanceAction; import handlers.actionhandlers.L2ArtefactInstanceAction;
import handlers.actionhandlers.L2DecoyAction; import handlers.actionhandlers.L2DecoyAction;
@@ -283,6 +284,30 @@ import handlers.targethandlers.affectscope.Square;
import handlers.targethandlers.affectscope.SquarePB; import handlers.targethandlers.affectscope.SquarePB;
import handlers.targethandlers.affectscope.StaticObjectScope; import handlers.targethandlers.affectscope.StaticObjectScope;
import handlers.targethandlers.affectscope.SummonExceptMaster; import handlers.targethandlers.affectscope.SummonExceptMaster;
import handlers.telnethandlers.chat.Announce;
import handlers.telnethandlers.chat.GMChat;
import handlers.telnethandlers.chat.Msg;
import handlers.telnethandlers.player.AccessLevel;
import handlers.telnethandlers.player.Ban;
import handlers.telnethandlers.player.BanChat;
import handlers.telnethandlers.player.Enchant;
import handlers.telnethandlers.player.GMList;
import handlers.telnethandlers.player.Give;
import handlers.telnethandlers.player.Jail;
import handlers.telnethandlers.player.Kick;
import handlers.telnethandlers.player.Unban;
import handlers.telnethandlers.player.UnbanChat;
import handlers.telnethandlers.player.Unjail;
import handlers.telnethandlers.server.ForceGC;
import handlers.telnethandlers.server.Memusage;
import handlers.telnethandlers.server.Performance;
import handlers.telnethandlers.server.Purge;
import handlers.telnethandlers.server.Reload;
import handlers.telnethandlers.server.ServerAbort;
import handlers.telnethandlers.server.ServerRestart;
import handlers.telnethandlers.server.ServerShutdown;
import handlers.telnethandlers.server.Status;
import handlers.telnethandlers.server.ThreadPoolDebug;
import handlers.usercommandhandlers.ChannelDelete; import handlers.usercommandhandlers.ChannelDelete;
import handlers.usercommandhandlers.ChannelInfo; import handlers.usercommandhandlers.ChannelInfo;
import handlers.usercommandhandlers.ChannelLeave; import handlers.usercommandhandlers.ChannelLeave;
@@ -697,6 +722,35 @@ public class MasterHandler
} }
} }
if (Config.TELNET_ENABLED)
{
TelnetServer.getInstance().addHandler(new Announce());
TelnetServer.getInstance().addHandler(new GMChat());
TelnetServer.getInstance().addHandler(new Msg());
TelnetServer.getInstance().addHandler(new AccessLevel());
TelnetServer.getInstance().addHandler(new Ban());
TelnetServer.getInstance().addHandler(new BanChat());
TelnetServer.getInstance().addHandler(new Enchant());
TelnetServer.getInstance().addHandler(new Give());
TelnetServer.getInstance().addHandler(new GMList());
TelnetServer.getInstance().addHandler(new Jail());
TelnetServer.getInstance().addHandler(new Kick());
TelnetServer.getInstance().addHandler(new Unban());
TelnetServer.getInstance().addHandler(new UnbanChat());
TelnetServer.getInstance().addHandler(new Unjail());
TelnetServer.getInstance().addHandler(new ForceGC());
TelnetServer.getInstance().addHandler(new Memusage());
TelnetServer.getInstance().addHandler(new Performance());
TelnetServer.getInstance().addHandler(new Purge());
TelnetServer.getInstance().addHandler(new Reload());
TelnetServer.getInstance().addHandler(new ServerAbort());
TelnetServer.getInstance().addHandler(new ServerRestart());
TelnetServer.getInstance().addHandler(new ServerShutdown());
TelnetServer.getInstance().addHandler(new Status());
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
TelnetServer.getInstance().addHandler(new handlers.telnethandlers.server.Debug());
}
for (IHandler<?, ?> loadInstance : LOAD_INSTANCES) for (IHandler<?, ?> loadInstance : LOAD_INSTANCES)
{ {
_log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers"); _log.info(loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " Handlers");

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.chat; package handlers.telnethandlers.chat;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Broadcast; import com.l2jmobius.gameserver.util.Broadcast;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Announce implements ITelnetCommand public class Announce implements ITelnetCommand
{ {
private Announce()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -58,9 +53,4 @@ public class Announce implements ITelnetCommand
Broadcast.toAllOnlinePlayers(sb.toString()); Broadcast.toAllOnlinePlayers(sb.toString());
return "Announcement sent!"; return "Announcement sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Announce());
}
} }

View File

@@ -20,7 +20,6 @@ import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.enums.ChatType; import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMChat implements ITelnetCommand public class GMChat implements ITelnetCommand
{ {
private GMChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMChat implements ITelnetCommand
AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString())); AdminData.getInstance().broadcastToGMs(new CreatureSay(0, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString()));
return "GMChat sent!"; return "GMChat sent!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay; import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -30,10 +29,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Msg implements ITelnetCommand public class Msg implements ITelnetCommand
{ {
private Msg()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -66,9 +61,4 @@ public class Msg implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Msg());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class AccessLevel implements ITelnetCommand public class AccessLevel implements ITelnetCommand
{ {
private AccessLevel()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -61,9 +56,4 @@ public class AccessLevel implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new AccessLevel());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Ban implements ITelnetCommand public class Ban implements ITelnetCommand
{ {
private Ban()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Ban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Ban());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class BanChat implements ITelnetCommand public class BanChat implements ITelnetCommand
{ {
private BanChat()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class BanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new BanChat());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import com.l2jmobius.gameserver.network.serverpackets.InventoryUpdate;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.GMAudit; import com.l2jmobius.gameserver.util.GMAudit;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -33,10 +32,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Enchant implements ITelnetCommand public class Enchant implements ITelnetCommand
{ {
private Enchant()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -168,9 +163,4 @@ public class Enchant implements ITelnetCommand
} }
return false; return false;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Enchant());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.data.xml.impl.AdminData; import com.l2jmobius.gameserver.data.xml.impl.AdminData;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class GMList implements ITelnetCommand public class GMList implements ITelnetCommand
{ {
private GMList()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -60,9 +55,4 @@ public class GMList implements ITelnetCommand
} }
return "There are currently " + i + " GM(s) online..." + Config.EOL + gms; return "There are currently " + i + " GM(s) online..." + Config.EOL + gms;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new GMList());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -31,10 +30,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Give implements ITelnetCommand public class Give implements ITelnetCommand
{ {
private Give()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -87,9 +82,4 @@ public class Give implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Give());
}
} }

View File

@@ -22,7 +22,6 @@ import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentTask; import com.l2jmobius.gameserver.model.punishment.PunishmentTask;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -32,10 +31,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Jail implements ITelnetCommand public class Jail implements ITelnetCommand
{ {
private Jail()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -86,9 +81,4 @@ public class Jail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Jail());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.player;
import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Kick implements ITelnetCommand public class Kick implements ITelnetCommand
{ {
private Kick()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -59,9 +54,4 @@ public class Kick implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Kick());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unban implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unban());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class UnbanChat implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new UnbanChat());
}
} }

View File

@@ -21,7 +21,6 @@ import com.l2jmobius.gameserver.instancemanager.PunishmentManager;
import com.l2jmobius.gameserver.model.punishment.PunishmentAffect; import com.l2jmobius.gameserver.model.punishment.PunishmentAffect;
import com.l2jmobius.gameserver.model.punishment.PunishmentType; import com.l2jmobius.gameserver.model.punishment.PunishmentType;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -61,9 +60,4 @@ public class Unjail implements ITelnetCommand
} }
return "Couldn't find player with such name."; return "Couldn't find player with such name.";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Unjail());
}
} }

View File

@@ -48,7 +48,6 @@ import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance; import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket; import com.l2jmobius.gameserver.network.serverpackets.AdminForgePacket;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.taskmanager.DecayTaskManager; import com.l2jmobius.gameserver.taskmanager.DecayTaskManager;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -60,10 +59,6 @@ public class Debug implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Debug.class.getName()); private static final Logger LOGGER = Logger.getLogger(Debug.class.getName());
private Debug()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -461,9 +456,4 @@ public class Debug implements ITelnetCommand
cal.set(Calendar.MINUTE, m); cal.set(Calendar.MINUTE, m);
return format.format(cal.getTime()); return format.format(cal.getTime());
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Debug());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ForceGC implements ITelnetCommand public class ForceGC implements ITelnetCommand
{ {
private ForceGC()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -48,9 +43,4 @@ public class ForceGC implements ITelnetCommand
System.gc(); System.gc();
return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576); return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576);
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ForceGC());
}
} }

View File

@@ -20,7 +20,6 @@ import java.text.DecimalFormat;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -29,10 +28,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Memusage implements ITelnetCommand public class Memusage implements ITelnetCommand
{ {
private Memusage()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -74,9 +69,4 @@ public class Memusage implements ITelnetCommand
sb.append("+----" + Config.EOL); sb.append("+----" + Config.EOL);
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Memusage());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Performance implements ITelnetCommand public class Performance implements ITelnetCommand
{ {
private Performance()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Performance implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Performance());
}
} }

View File

@@ -19,7 +19,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.Config; import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Purge implements ITelnetCommand public class Purge implements ITelnetCommand
{ {
private Purge()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class Purge implements ITelnetCommand
} }
return sb.toString(); return sb.toString();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Purge());
}
} }

View File

@@ -46,7 +46,6 @@ import com.l2jmobius.gameserver.instancemanager.QuestManager;
import com.l2jmobius.gameserver.instancemanager.WalkingManager; import com.l2jmobius.gameserver.instancemanager.WalkingManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager; import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.scripting.ScriptEngineManager; import com.l2jmobius.gameserver.scripting.ScriptEngineManager;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
@@ -59,10 +58,6 @@ public class Reload implements ITelnetCommand
{ {
private static final Logger LOGGER = Logger.getLogger(Reload.class.getName()); private static final Logger LOGGER = Logger.getLogger(Reload.class.getName());
private Reload()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -266,9 +261,4 @@ public class Reload implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Reload());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -27,10 +26,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerAbort implements ITelnetCommand public class ServerAbort implements ITelnetCommand
{ {
private ServerAbort()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -49,9 +44,4 @@ public class ServerAbort implements ITelnetCommand
Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString()); Shutdown.getInstance().telnetAbort(ctx.channel().remoteAddress().toString());
return "Server shutdown/restart aborted!"; return "Server shutdown/restart aborted!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerAbort());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerRestart implements ITelnetCommand public class ServerRestart implements ITelnetCommand
{ {
private ServerRestart()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerRestart implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, true);
return "Server will restart in " + time + " seconds!"; return "Server will restart in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerRestart());
}
} }

View File

@@ -18,7 +18,6 @@ package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.Shutdown; import com.l2jmobius.gameserver.Shutdown;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import com.l2jmobius.gameserver.util.Util; import com.l2jmobius.gameserver.util.Util;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -28,10 +27,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class ServerShutdown implements ITelnetCommand public class ServerShutdown implements ITelnetCommand
{ {
private ServerShutdown()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -55,9 +50,4 @@ public class ServerShutdown implements ITelnetCommand
Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false); Shutdown.getInstance().startTelnetShutdown(ctx.channel().remoteAddress().toString(), time, false);
return "Server will shutdown in " + time + " seconds!"; return "Server will shutdown in " + time + " seconds!";
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ServerShutdown());
}
} }

View File

@@ -17,7 +17,6 @@
package handlers.telnethandlers.server; package handlers.telnethandlers.server;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -26,10 +25,6 @@ import io.netty.channel.ChannelHandlerContext;
*/ */
public class Status implements ITelnetCommand public class Status implements ITelnetCommand
{ {
private Status()
{
}
@Override @Override
public String getCommand() public String getCommand()
{ {
@@ -47,9 +42,4 @@ public class Status implements ITelnetCommand
{ {
return Debug.getServerStatus(); return Debug.getServerStatus();
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new Status());
}
} }

View File

@@ -30,7 +30,6 @@ import com.l2jmobius.Config;
import com.l2jmobius.gameserver.ThreadPoolManager; import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper; import com.l2jmobius.gameserver.ThreadPoolManager.RunnableWrapper;
import com.l2jmobius.gameserver.network.telnet.ITelnetCommand; import com.l2jmobius.gameserver.network.telnet.ITelnetCommand;
import com.l2jmobius.gameserver.network.telnet.TelnetServer;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
@@ -169,9 +168,4 @@ public class ThreadPoolDebug implements ITelnetCommand
} }
return null; return null;
} }
public static void main(String[] args)
{
TelnetServer.getInstance().addHandler(new ThreadPoolDebug());
}
} }