Esempio n. 1
0
 public void connect() {
   if (Client.instance() == null) {
     new Thread(
             new Runnable() {
               public void run() {
                 try {
                   new Client(server, channel, name);
                 } catch (IOException e) {
                   e.printStackTrace();
                 } catch (IrcException e) {
                   e.printStackTrace();
                 }
               }
             })
         .start();
     while (Client.instance() == null) sleep(50);
   }
   Client.instance().showGui();
   if (Client.instance().isConnected()) return;
   try {
     while (Gui.instance() == null || Gui.instance().userListPane == null) sleep(50);
     Client.instance().join();
   } catch (IOException e) {
     e.printStackTrace();
   } catch (IrcException e) {
     e.printStackTrace();
   }
 }
Esempio n. 2
0
 public void openGui() {
   if (Client.instance() != null) Client.instance().showGui();
 }
Esempio n. 3
0
 public void onFinish() {
   if (Client.instance() != null) Client.instance().closeGui();
 }