outputString = "<b>" + jfritz.getMessages().getString( "incoming_call") + "</b>"; if (!splitList[0].equals("")) { outputString = outputString + "\n" + jfritz.getMessages() .getString("name") + ": " + splitList[0];
String name = ""; String number = ""; if (splitList.length == 0) { name = "Unbekannt"; number = "Unbekannt";
	public void run() {		try {			Debug.msg("Starting YAC listener");			// TODO: configurable Port			ServerSocket serverSocket = new ServerSocket(yacPort);			while (true) {				Socket socket = serverSocket.accept();				BufferedReader input = new BufferedReader(						new InputStreamReader(socket.getInputStream()));				while (true) {					String[] splitList;					String nachricht = input.readLine();					if (nachricht == null)						break;					// parsing incoming DATA					Debug.msg("Got YAC-Data: " + nachricht);					String outputString = "";					if (nachricht.contains("~")) {						if (nachricht.startsWith("@CALL")) {							nachricht = nachricht.substring(5);							splitList = nachricht.split("~");							outputString = "<b>"									+ jfritz.getMessages().getString(											"incoming_call") + "</b>";							if (!splitList[0].equals("")) {								outputString = outputString										+ "\n"										+ jfritz.getMessages()												.getString("name") + ": "										+ splitList[0];							}							outputString = outputString + "\n"									+ jfritz.getMessages().getString("number")									+ ": " + splitList[1];						} else {							outputString = "<b>"									+ jfritz.getMessages().getString(											"yac_message") + "</b>" + ":\n"									+ nachricht;						}					} else {						outputString = "<b>"								+ jfritz.getMessages().getString("yac_message")								+ "</b>" + ":\n" + nachricht;					}					jfritz.infoMsg(outputString);					if (!JFritz.SYSTRAY_SUPPORT) {						//TODO: PopUp-Message					}				}				socket.close();			}		} catch (IOException e) {			System.out.println(e);		}	}