hey guys im back to 317s finaly :) anyways my ipban dont work help needed
Code:
if (command.startsWith("ipban") && (playerRights >= 3)) {
String victim = command.substring(6);
int index = PlayerHandler.getPlayerID(victim);
client v = (client) server.playerHandler.players[index];
appendToBannedIps(v.connectedFrom);
v.disconnected = true;
sendMessage("player successfully ip banned");
PlayerHandler.messageToAll = playerName
+ ": HAS IP BANNED THE PLAYER: " + command.substring(5);
BufferedWriter bw = null;
try {
bw = new BufferedWriter(
new FileWriter("logs/ipbanlogs.txt", true));
bw.write(playerName + " banned" + victim);
bw.newLine();
bw.flush();
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
if (bw != null) {
try {
bw.close();
} catch (IOException ioe2) {
sendMessage("Error logging ip bans!");
}
}
}
}
does that look good for you guys when ever i type it it just kicks me :(