Use MapleClient for session management
First working version of the Netty implementation, but there's a lot remaining to be done.
This commit is contained in:
@@ -52,7 +52,7 @@ public class BanCommand extends Command {
|
||||
MapleCharacter target = c.getChannelServer().getPlayerStorage().getCharacterByName(ign);
|
||||
if (target != null) {
|
||||
String readableTargetName = MapleCharacter.makeMapleReadable(target.getName());
|
||||
String ip = target.getClient().getSession().getRemoteAddress().toString().split(":")[0];
|
||||
String ip = target.getClient().getRemoteAddress();
|
||||
//Ban ip
|
||||
try (Connection con = DatabaseConnection.getConnection()) {
|
||||
if (ip.matches("/[0-9]{1,3}\\..*")) {
|
||||
|
||||
Reference in New Issue
Block a user