Пример #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();
   }
 }
Пример #2
0
 public void openGui() {
   if (Client.instance() != null) Client.instance().showGui();
 }
Пример #3
0
 public void onFinish() {
   if (Client.instance() != null) Client.instance().closeGui();
 }