cleanup: adjust syntax
This commit is contained in:
@@ -49,7 +49,7 @@ public class WarpWorldCommand extends Command {
|
|||||||
byte worldb = Byte.parseByte(params[0]);
|
byte worldb = Byte.parseByte(params[0]);
|
||||||
if (worldb <= (server.getWorldsSize() - 1)) {
|
if (worldb <= (server.getWorldsSize() - 1)) {
|
||||||
try {
|
try {
|
||||||
String[] socket = server.getInetSocket(worldb, c.getChannel());
|
String[] socket = server.getInetSocket(c.getSession(), worldb, c.getChannel());
|
||||||
c.getWorldServer().removePlayer(player);
|
c.getWorldServer().removePlayer(player);
|
||||||
player.getMap().removePlayer(player);//LOL FORGOT THIS ><
|
player.getMap().removePlayer(player);//LOL FORGOT THIS ><
|
||||||
player.setSessionTransitionState();
|
player.setSessionTransitionState();
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ import org.apache.mina.core.buffer.IoBuffer;
|
|||||||
import org.apache.mina.core.buffer.SimpleBufferAllocator;
|
import org.apache.mina.core.buffer.SimpleBufferAllocator;
|
||||||
import org.apache.mina.core.service.IoAcceptor;
|
import org.apache.mina.core.service.IoAcceptor;
|
||||||
import org.apache.mina.core.session.IdleStatus;
|
import org.apache.mina.core.session.IdleStatus;
|
||||||
|
import org.apache.mina.core.session.IoSession;
|
||||||
import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
import org.apache.mina.filter.codec.ProtocolCodecFilter;
|
||||||
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
|
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -285,8 +286,7 @@ public class Server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getInetSocket(int world, int channel) {
|
public String[] getInetSocket(IoSession session, int world, int channel) {
|
||||||
public String[] getInetSocket(IoSession session, int world, int channel) {
|
|
||||||
String remoteIp = MapleSessionCoordinator.getSessionRemoteAddress(session);
|
String remoteIp = MapleSessionCoordinator.getSessionRemoteAddress(session);
|
||||||
|
|
||||||
String[] hostAddress = getIP(world, channel).split(":");
|
String[] hostAddress = getIP(world, channel).split(":");
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ import java.util.Map.Entry;
|
|||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user