Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8001341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:04:13+00:00 2026-06-04T16:04:13+00:00

if (serverResponse.contains(PING )) { writer.write(PONG + serverResponse.substring(5) + \r\n); writer.write(PRIVMSG + c.getHomechannel() + :I

  • 0
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( );
}

and

if (cmd.equalsIgnoreCase("PING")) {
    TCPRequestManager.sendWrite("PONG " + param);
    TCPRequestManager.doMsg("c.getHomechannel()", ":I got pinged!");
    TCPConnectionManager.getWriter().flush( );
}

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:04:14+00:00Added an answer on June 4, 2026 at 4:04 pm

    Shouldn’t the PONG message contain a destination? I’m guessing the serverResponse.substring(5) in the first code block is the servername of the server pinging your server. It’s expecting a PONG from your server to the irc server.

    Typically, the transaction looks something like this, a.com is the hostname of the irc server, b.com is the hostname of the bot connected to it:

    PING :a.com          (sent from a.com to b.com)
    PONG b.com :a.com    (sent from b.com to a.com)
    

    It looks like what you’re sending (given the previous example) is:

    PING :a.com          (sent from a.com to b.com)
    PONG :a.com          (sent from b.com to a.com, except there's no origin)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to invoke a Servlet on application startup since it contains some application
I am requesting with AJAX (using jQuery) a tag which contains a Javascript function
I am trying to write a routing framework of nodejs, I need to add
I thought this was fairly simple. But, it's turning out to not be. I
So I'm trying to write a php SOAP client that requires the user to
I've got the following code for a file upload with Apache's HTTP-Client (org.apache.http.client): public
In my Android application I make a HTTP POST connection: serverresponse = CustomHttpClient.executeHttpPost(url, postParameters);
I've been getting the following exception when trying to send an e-mail using System.Net.Mail:
I hate to just post a stack trace here, but I am out of
I'm intercepting server response via datatype, but I've noticed that the loading.. message is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.