Ejemplo n.º 1
0
 public void stop() {
   writeLine("QUIT :Connection closing...");
   reader.kill();
   writer.kill();
   try {
     bWriter.flush();
   } catch (IOException e) {
     manager
         .getPlugin()
         .warn(
             "An error occurred while flushing the output stream for '"
                 + hostname
                 + ":"
                 + port
                 + "'");
   } finally {
     try {
       bWriter.close();
       bReader.close();
     } catch (IOException e) {
       manager
           .getPlugin()
           .warn("An error occured while closing the streams for '" + hostname + ":" + port + "'");
     } finally {
       try {
         connection.close();
       } catch (IOException e) {
         manager
             .getPlugin()
             .warn(
                 "An error occurred while closing the socket for '" + hostname + ":" + port + "'");
       }
     }
   }
 }
Ejemplo n.º 2
0
 private void auth() {
   for (String auth : manager.getConfig().getString("networks." + network + ".auth").split("\n")) {
     writeLine(auth);
   }
 }