public static String formatMessage(String message, String target)
	{
		String formattedMessage = "";
		boolean validCommand = false;
		String command = "";
		int commandIndex = -1;

		if(message.startsWith("/"))
		{

			try {
				command = message.substring(1, message.indexOf(" "));
			} catch (StringIndexOutOfBoundsException e) {
				System.out.println("Probably not a vaild command");
				command = message;
			}

			int i = 0;

			while (!validCommand && i < commands.length - 1)
			{
				if(command.equalsIgnoreCase(commands[i]))
				{
					commandIndex = i;
					validCommand = true;
				}

				i++;
			}

			if(validCommand)
			{
				if(command.equals("/QUIT")) {
					formattedMessage = makeQuit(message);
				} else {
					formattedMessage = commands[commandIndex]+ " " + 
							message.substring(message.indexOf(" ")+1, message.length());
				}
			}
		} 
		else 
		{
			formattedMessage = makePrivmsg(message, target);
		}
		
		formattedMessage += RNTAIL;


		return formattedMessage;

	}