@Override
	public void actionPerformed(ActionEvent ae) {
		String line = source.getLastInput();
		if(line != null){
			if(line.startsWith("/")){
				String cmd_name = line.substring(1, Math.max(line.indexOf(" "), line.length()));
				if(cmd_name.equals(Constants.COMMAND_QUIT)){
					Main.quit();
				} else if(cmd_name.equals(Constants.COMMAND_GUI)){
					Main.setGuiIO();
				} else if(cmd_name.equals(Constants.COMMAND_CONSOLE)){
					Main.setConsoleIO();
				} else if(cmd_name.equals(Constants.COMMAND_RESTART)){
					Main.restartServer();
				} else{
					printHelp();
				}
			}
		}
	}