public void checkDoor() { String x = ""; while (true) { try { Thread.sleep(500); if (!getBash("cat door.txt")[0].equals(x)) { x = getBash("cat door.txt")[0]; sendMessage(channel, "door iz " + getBash("cat door.txt")[0]); } } catch (Exception e) { System.out.println(e.getMessage()); sendMessage(channel, e.getMessage()); } } }
protected void onDisconnect() { // TODO Auto-generated method stub super.onDisconnect(); while (true) { try { Thread.sleep(60000); reconnect(); } catch (NickAlreadyInUseException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IrcException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }