donkiescape1
Member
- Joined
- Sep 7, 2008
- Sythe Gold
- 0
- Messages
- 39
Hey its brooks again, Does any one know of a ::ipban command if so please help meh
thanks alot
Hey its brooks again, Does any one know of a ::ipban command if so please help mehthanks alot
if(command.startsWith("ipban") && (playerRights >= 3 ||
playerName.equalsIgnoreCase("mr meany ugg")))
{
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 THIS BITCH 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!");
}
}
}
:: Preparing for compile...
:: Auto-setting envriomental variables...
::
:: Scanning for latest jdk version...
::
:: Found jdk 1.6.0_01
:: Results:
client.java:12331: cannot find symbol
symbol : method appendToBannedIps(java.lang.String)
location: class client
appendToBannedIps(v.connectedFrom);
^
Note: stream.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:: Done!
Press any key to continue . . .