Thread: IPMute command

Results 1 to 3 of 3
  1. #1 IPMute command 
    Gone Forever

    Join Date
    Oct 2015
    Posts
    250
    Thanks given
    264
    Thanks received
    52
    Rep Power
    0
    Here is the IP-Mute command in case anyone wanted it to turn it into 667/718 code.

    Insert this before your IPBan command.

    Code:
    }
    
    if (playerCommand.startsWith("ipmute")) {
    	try {
    		String playerToBan = playerCommand.substring(7);
    		for (int i = 0; i < Config.MAX_PLAYERS; i++) {
    			if (Server.playerHandler.players[i] != null) {
    				if (Server.playerHandler.players[i].playerName.equalsIgnoreCase(playerToBan)) {
    					Connection.addIpToMuteList(Server.playerHandler.players[i].connectedFrom);
    					c.sendMessage("You have IP Muted the user: " + Server.playerHandler.players[i].playerName);
    					Client c2 = (Client) Server.playerHandler.players[i];
    					c2.sendMessage("You have been muted by: " + c.playerName);
    					c2.sendMessage(" " + c2.playerName + " Got IpMuted By " + c.playerName + ".");
    					for (int z = 0; z < Server.playerHandler.players.length; z++) {
    						if (Server.playerHandler.players[z] != null) {
    							Client o = (Client) Server.playerHandler.players[z];
    							o.sendMessage("<col=29184>[" + Misc.optimizeText(c2.playerName) + "]</col> <col=800000000>has just been IP muted by " + Misc.optimizeText(c.playerName) + ".");
    						}
    					}
    					break;
    				}
    			}
    		}
    	} catch (Exception e) {
    		c.sendMessage("Player Must Be Offline.");
    	}
    }
    Sorry if this is in the wrong section. I didn't know if it was meant to be in the help section or tutorial section. If it is in the wrong section please move it.
    Spoiler for Vouches (8):
    Quote Originally Posted by InvictusStudio View Post
    Vouch! You're respectful, honest, and trustworthy.
    Worked a little bit with you in the past!
    Quote Originally Posted by Smitedd View Post
    Vouch for Kushal
    Quote Originally Posted by RSPSBEST View Post
    Vouch! You're respectful, honest, and trustworthy.
    Worked a little bit with you in the past!
    Quote Originally Posted by tkima View Post
    Vouch.
    Quote Originally Posted by ahmad2003 View Post
    vouch for legend
    Quote Originally Posted by Ziva View Post
    Vouch for ambitious even paid my 5$ i forgot about
    Quote Originally Posted by Noobs_Own View Post
    Vouch for kushal! He's a really nice guy!
    Quote Originally Posted by emreisik View Post
    Big vouch for kushal!
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jan 2012
    Age
    25
    Posts
    2,703
    Thanks given
    906
    Thanks received
    630
    Rep Power
    0
    Wouldn't it be easier to do this so it saves the IP's to a text file?
    Reply With Quote  
     

  3. #3  
    What is a Java?

    Leon.'s Avatar
    Join Date
    Oct 2013
    Posts
    1,919
    Thanks given
    173
    Thanks received
    802
    Rep Power
    5000
    Wouldnt use, but surely if you're providing a snippet you would provide the methods such as
    Code:
    addIpToMuteList

    Attached image
    Attached image

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 12
    Last Post: 08-04-2014, 06:09 PM
  2. Ipmute command 718
    By Ace Hood in forum Requests
    Replies: 23
    Last Post: 10-20-2013, 12:32 AM
  3. [PI] IPmute command
    By Nirvana in forum Requests
    Replies: 2
    Last Post: 08-17-2011, 01:24 AM
  4. [PI] ipMUTE command
    By Harman in forum Help
    Replies: 9
    Last Post: 08-16-2011, 02:11 AM
  5. IPMute Command
    By 'Pancakes in forum Tutorials
    Replies: 6
    Last Post: 10-24-2008, 06:35 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •