[Tut] game banning command

Results 1 to 4 of 4
  1. #1
    Account Upgraded | Title Enabled! connoreaton is offline
    MemberRank
    Dec 2007 Join Date
    In your toilet on the side.... and im black!Location
    252Posts

    Cool [Tut] game banning command

    NOTE: you must have the file Data/bannedips.txt for this to work.
    NOTE: always make a backup before trying anything with client.java

    1.Open up Client.JAVA and hold ctrl+F and search for

    if(command.startsWith

    and paste this right above the result:

    if(command.startsWith("banuser") && (playerRights >= 2))
    {
    String victim = command.substring(8);
    PlayerHandler.kickNick = victim;
    System.out.println("Admin:"+playerName+" is banning "+victim);
    sendMessage("Player "+victim+" successfully banned");
    appendToBanned(victim);
    BufferedWriter bw = null;
    try {
    bw = new BufferedWriter(new FileWriter("logs/banlogs.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 bans!");
    }
    }
    try {
    bw = new BufferedWriter(new FileWriter("./logs/banlogs.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 bans!");


    enjoy


  2. #2
    Apprentice plusscape is offline
    MemberRank
    Mar 2008 Join Date
    14Posts

    Re: [tut] in game banning command

    hmm awsome tut but do u need to compile server after this? if u have to i cant cos i dont have JDK do u no the link 4 download? add meh msn plus900@hotmail.co.uk

  3. #3
    There's no RL just AFK -fedexer- is offline
    MemberRank
    May 2006 Join Date
    ScotlandLocation
    1,632Posts

    Re: [tut] in game banning command

    Nice.. straight out of a source, also you haven't put the code in code tags, and also just from a quick glance , that code will make people's servers throw errors as you have not supplied the whole extracted code from said source.

  4. #4
    Account Upgraded | Title Enabled! iHax is offline
    MemberRank
    Dec 2007 Join Date
    Inside you're PCLocation
    309Posts

    Re: [tut] in game banning command

    Almost all servers got this, so its kinda useless.. And i tryed,



Advertisement