Need ::ipban Command!

Discussion in 'RuneScape Miscellaneous' started by donkiescape1, Sep 11, 2008.

Thread Status:
Not open for further replies.
Need ::ipban Command!
  1. Unread #1 - Sep 11, 2008 at 5:35 PM
  2. donkiescape1
    Joined:
    Sep 7, 2008
    Posts:
    39
    Referrals:
    0
    Sythe Gold:
    0

    donkiescape1 Member

    Need ::ipban Command!

    Hey its brooks again, Does any one know of a ::ipban command if so please help meh :D thanks alot
     
  3. Unread #2 - Sep 11, 2008 at 7:17 PM
  4. MCR__Ftw
    Joined:
    Mar 19, 2007
    Posts:
    1,084
    Referrals:
    0
    Sythe Gold:
    0

    MCR__Ftw Guru
    $5 USD Donor

    Need ::ipban Command!

    Code:
    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!");
    	 }
          }
    }
    
    
    taken from my old server.
     
  5. Unread #3 - Sep 11, 2008 at 7:43 PM
  6. donkiescape1
    Joined:
    Sep 7, 2008
    Posts:
    39
    Referrals:
    0
    Sythe Gold:
    0

    donkiescape1 Member

    Need ::ipban Command!

    Thanks alot, does it matter what i change that name to ?
     
  7. Unread #4 - Sep 11, 2008 at 7:48 PM
  8. donkiescape1
    Joined:
    Sep 7, 2008
    Posts:
    39
    Referrals:
    0
    Sythe Gold:
    0

    donkiescape1 Member

    Need ::ipban Command!

    When i added it i got this ERROR please help.
    Code:
    :: 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 . . .
     
< ~shawscape V2~ | Moparscape Download >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site