Page 1 of 1

Help with Client (ping/pong verification)

Posted: Thu May 26, 2005 6:11 pm
by andrewkoz
I have a client that uses IRC for messaging alerts and other text. The problem is that it's logging is as this:

++++++++++++++++++++++++++++
user ANDREWK x y :koz|TSR|Master-Qe-AA
:irctest NOTICE AUTH :*** Looking up your hostname...
:irctest NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead

nick ANDREWK
:irctest NOTICE ANDREWK :*** If you are having problems connecting due to ping timeouts, please type /quote pong DAD1D8AD or /raw pong DAD1D8AD now.
PING :DAD1D8AD


+++++++++++++++++++++++++++++

If I type in pong DAD1D8AD, then I can login. Is there a setting on the IRC daemon that will not send the ping verifcation? I need the login to just execute. I'm having to type pong .... every time the server sends ping. I can only raise the ping freq to 600ms. Is this a verification that can be modified? Or is the client hosed?

Thanks appreciated to this newb.

Re: Help with Client (ping/pong verification)

Posted: Thu May 26, 2005 6:16 pm
by Matridom
andrewkoz wrote:I have a client that uses IRC for messaging alerts and other text. The problem is that it's logging is as this:

++++++++++++++++++++++++++++
user ANDREWK x y :koz|TSR|Master-Qe-AA
:irctest NOTICE AUTH :*** Looking up your hostname...
:irctest NOTICE AUTH :*** Couldn't resolve your hostname; using your IP address instead

nick ANDREWK
:irctest NOTICE ANDREWK :*** If you are having problems connecting due to ping timeouts, please type /quote pong DAD1D8AD or /raw pong DAD1D8AD now.
PING :DAD1D8AD


+++++++++++++++++++++++++++++

If I type in pong DAD1D8AD, then I can login. Is there a setting on the IRC daemon that will not send the ping verifcation? I need the login to just execute. I'm having to type pong .... every time the server sends ping. I can only raise the ping freq to 600ms. Is this a verification that can be modified? Or is the client hosed?

Thanks appreciated to this newb.
That's a function of the IRC to keep track of what clients are still alive, it's a requirement. Most client however will automaticly deal with the ping/pong response, Not sure what your client is.

The server will not "ping" untill the ping frequencie has been reached without any input from you specificly. If your client as an anti-idle script, you may want to look at that (however, that is avoiding the problem rather then solving it)

Posted: Thu May 26, 2005 6:31 pm
by andrewkoz
I think I read earlier that I can recompile with no-spoof option disabled. The problem is I don't think I can compile on windows with the option disabled, right? If I compile on NIX with the nospoof option disabled, will this fix it?

Posted: Thu May 26, 2005 6:34 pm
by Syzop
Yes, if you are running a recent (like: not 5 year old) version of Linux or FreeBSD then you can safely disable nospoof during ./Config.
This will get rid of the initial pong requirement.
Of course the rest of the story from Matridom (idle pings) still applies.

Posted: Thu May 26, 2005 6:34 pm
by Stealth
This instance of ping/pong is usually handled by the client, but in your clients case, the client is ignoring it because it was not made to reply to pings before the connection is established. Once the connection is established, your client should respond to pings automatically. (Client gets "PING :Blah", and is supposed to reply with "PONG :Blah")

You cannot disable ping/pong all together, because it is used by the server to see if clients are still alive (I believe this is an even that is supposed to happen by protocol).

If it is just connecting that you are having the trouble with, you can disable the NOSPOOF in ./Config before you compile. NOSPOOF keeps people from spoofing hosts. If someone spoofs a host, they cannot send anything to the IRCd, and this PING before connecting will stop these clients from getting a full connection. If you are on Windows, this option is highly recommended, and should not be disabled.

Posted: Thu May 26, 2005 6:36 pm
by Matridom
andrewkoz wrote:I think I read earlier that I can recompile with no-spoof option disabled. The problem is I don't think I can compile on windows with the option disabled, right? If I compile on NIX with the nospoof option disabled, will this fix it?
The problem your describing is a function of how IRC works. period.

let me give you an example of the problems you would experience if you turned that off.

I'm connected to your server, you don't run services.
my connection dies, so i can't disconnect properly.
i reconnect to your server, but my name is already in use.
I can't find an ircop to force disconnect my "clone"
so i'm now stuck with two copies of myself cause the clone will stay connected indefinatly untill someone force disconnects them with a kill.

now say this happens 10 times in one day cause i have cruddy power?

the ping/pong response is to make sure that the users that are connected are still "alive" and will "ping timeout" people who do not respond to keep the system "clean" of dead connections.

Posted: Thu May 26, 2005 6:41 pm
by andrewkoz
thanks for the help. I appreciate it.

Posted: Thu May 26, 2005 10:47 pm
by aquanight
Why not just write the client to handle PINGs correctly? You already need to wait at least until the 001 is received before you can begin doing whatever the client needs to do. It's only a little extra to catch a PING.

Anyway, yeah, you can disable nospoof, and yes you can disable it on Windows but this is a Bad Idea(tm).