2011-05-13 04:24:42 -04:00
|
|
|
package org.moparscape.msc.ls.packethandler.loginserver;
|
2011-04-27 01:44:26 -04:00
|
|
|
|
|
|
|
import java.sql.SQLException;
|
|
|
|
|
|
|
|
import org.apache.mina.common.IoSession;
|
2011-05-13 04:24:42 -04:00
|
|
|
import org.moparscape.msc.ls.Server;
|
|
|
|
import org.moparscape.msc.ls.net.Packet;
|
|
|
|
import org.moparscape.msc.ls.packethandler.PacketHandler;
|
2011-04-27 01:44:26 -04:00
|
|
|
|
|
|
|
|
|
|
|
public class KillHandler implements PacketHandler {
|
|
|
|
|
|
|
|
public void handlePacket(Packet p, IoSession session) throws Exception {
|
|
|
|
try {
|
|
|
|
Server.db.updateQuery("INSERT INTO `pk_kills`(`user`, `killed`, `time`, `type`) VALUES('" + p.readLong() + "', '" + p.readLong() + "', " + (int) (System.currentTimeMillis() / 1000) + ", " + p.readByte() + ")");
|
|
|
|
} catch (SQLException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|