Thread: Close Please! - Fixed

Results 1 to 9 of 9
  1. #1 Close Please! - Fixed 
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Close please, it was fixed.
     

  2. #2  
    Vitality

    Raw Envy's Avatar
    Join Date
    Dec 2010
    Posts
    3,034
    Thanks given
    869
    Thanks received
    1,186
    Rep Power
    3054
    Post this in the client help section.
     

  3. #3  
    Super Donator

    Batukka's Avatar
    Join Date
    Oct 2011
    Posts
    2,433
    Thanks given
    86
    Thanks received
    342
    Rep Power
    496
    show ur yell method
     

  4. #4  
    Registered Member

    Join Date
    Sep 2011
    Posts
    812
    Thanks given
    195
    Thanks received
    60
    Rep Power
    129
    ah easy , add me (:
    [email protected]
     

  5. #5  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Sorry everyone, posted this at the middle of the night, so I fell asleep afterwards.


    Here's my yell method;
    Also, for some reason it's handled in Client.java, I'm not sure if that has anything to do with it or not.

    Code:
    	public void handleYell(String playerCommand) {
    		/**
    		* The ::yell command
    		* and the censor for it.
    		*/
    		String text = playerCommand.substring(5);
    		String[] bad = {"<img=1>", "<img=2>", "<img=0>", "join", "www.", "http"};
    		for(int i = 0; i < bad.length; i++){
    			if(text.indexOf(bad[i]) >= 0){
    				sendMessage("You cannot use <img= 1>, <img= 2>, or <img= 3 in yell!");
                                    sendMessage("You cannot use the words "Join" - "www." or "http" in yell either!");
    				return;
    			}
    		}
    		for (int j = 0; j < Server.playerHandler.players.length; j++) {
    			if (Server.playerHandler.players[j] != null) {
    				Client c2 = (Client)Server.playerHandler.players[j];
    				if(Connection.isMuted(this)){
    					sendMessage("You are muted and cannot yell");
    					return;
    				}
    				if (isDonator == 0) {
    					sendMessage("You must be a donator to use this command!");
    					return;
    				}
    				if (isDonator == 1 && (playerRights == 4 )) {
    					c2.sendMessage("<shad=6081134>[Donator]</col><img=2>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (isDonator > 0 && (playerRights == 5 )) {
    					c2.sendMessage("<shad=6081134>[Super Donator]</col><img=3>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (isDonator > 0 && (playerRights == 6 )) {
    					c2.sendMessage("<shad=6081134>["+customYellTag+"]</col><img=4>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (playerRights == 1) {
    					c2.sendMessage("<shad=3781373>[Moderator]</col><img=0>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (playerRights == 2) {
    					c2.sendMessage("<shad=16112652>[Administrator]</col><img=1>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (playerRights == 9) {
    					c2.sendMessage("<shad=750301>[GFX Designer]</col>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (playerRights == 8) {
    					c2.sendMessage("<shad=750301>[Trial Moderator]</col>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				} else if (playerName.equalsIgnoreCase("phaethon")) {
    					c2.sendMessage("<shad=12595455>[Main Owner/Coder]</col><img=1></shad>"+ Misc.optimizeText(playerName) +": "
    									+ Misc.optimizeText(playerCommand.substring(5)) +"");
    				}
    			}
    		}
    	}
    So I'm not sure if I need to modify it to put in with commands.java or what I need to do.

    Edit: Also, here's my yell command in commands.java

    Code:
    			if (playerCommand.startsWith("yell")) {
    				c.handleYell(playerCommand);
    			}
     

  6. #6  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Bump; Still need help..
     

  7. #7  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Bump; Someone's gotta know how to fix this..



    I doubt that there's that many members and not a single one knows how to fix this..
     

  8. #8  
    Registered Member
    Join Date
    Sep 2010
    Posts
    448
    Thanks given
    42
    Thanks received
    23
    Rep Power
    4
    i know it, simple lol, pmed u fix...
     

  9. #9  
    Registered Member

    Join Date
    Mar 2011
    Posts
    527
    Thanks given
    89
    Thanks received
    49
    Rep Power
    97
    Fixed, Mod close please.
     


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. [PI] Simple Yell with Crowns
    By Roboyto in forum Snippets
    Replies: 30
    Last Post: 01-18-2014, 11:14 PM
  2. [PI] Yell Crowns??
    By Peach in forum Help
    Replies: 6
    Last Post: 04-13-2011, 06:46 AM
  3. Crowns on Yell ?
    By Xynasty in forum Help
    Replies: 0
    Last Post: 02-28-2011, 12:55 AM
  4. Staff crowns in yell?
    By infallible in forum Help
    Replies: 2
    Last Post: 03-24-2010, 03:20 AM
  5. Request - Crowns before names in ::yell
    By lovedhorizon in forum Requests
    Replies: 0
    Last Post: 03-10-2010, 01:07 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •