title: Java irc bot ping pong
body: <pre><code>if (serverResponse.contains("PING ")) {
      writer.write("PONG " + serverResponse.substring(5) + "\r\n");
      writer.write("PRIVMSG " + c.getHomechannel() + " :I got pinged!\r\n");
      System.out.println("pinged");
      writer.flush( );
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>if (cmd.equalsIgnoreCase("PING")) {
      TCPRequestManager.sendWrite("PONG " + param);
      TCPRequestManager.doMsg("c.getHomechannel()", ":I got pinged!");
      TCPConnectionManager.getWriter().flush( );
  }
  </code></pre>
  
  <p>both SEEM to work and send me the message saying the clients been pinged but i don't think its actually returning the pong due to disconnecting, am i doing something wrong?</p>