[cl-irc-devel] Problem with IRC Pings in lisppaste...

Eric Moncrieff eric at ping.ca
Fri Dec 3 21:49:07 UTC 2004


Hello,

I am using lisppaste on my work's private IRC servers, and it works
great.  However, after a while, I see a ping timeout.  I ornamented
the ping-message-hook as follows, and set irc::*debug-p*:

* (setf irc::*debug-p* t)

* (defmethod irc::default-hook ((irc::message irc::irc-ping-message))
        (format t "Got PING message.~%")
        (irc::pong (irc::connection irc::message) 
                   (irc::trailing-argument irc::message)))

On the next PING message, I saw:

#<CL-IRC:IRC-PING-MESSAGE  PING {912F1C1}>
is an instance of class #<STANDARD-CLASS CL-IRC:IRC-PING-MESSAGE>.
The following slots have :INSTANCE allocation:
"RAW-MESSAGE-STRING    "PING :riker.yyz.COMPANY.COM
 RECEIVED-TIME         3311096689
 CONNECTION            #<CL-IRC:CONNECTION riker.yyz.COMPANY.COM
{A3D0341}>
 TRAILING-ARGUMENT     "riker.yyz.COMPANY.COM"
 ARGUMENTS             NIL
 COMMAND               "PING"
 HOST                  ""
 USER                  ""
 SOURCE                ""
NILGot PING message.
UNHANDLED-EVENT:3311096689: PING:  "riker.yyz.COMPANY.COM"

So then I ornamented irc::pong:

* (defmethod irc::pong ((connection irc::connection) 
                        (server string) &optional (server2 "")) 
    (format *debug-stream* "Sending PONG: ~A"
            (describe server)) 
    (irc::send-irc-message connection :pong nil server server2))

The next ping I saw:  

#<CL-IRC:IRC-PING-MESSAGE  PING {93DCC01}>
is an instance of class #<STANDARD-CLASS CL-IRC:IRC-PING-MESSAGE>.
The following slots have :INSTANCE allocation:
"RAW-MESSAGE-STRING    "PING :riker.yyz.COMPANY.COM
 RECEIVED-TIME         3311097683
 CONNECTION            #<CL-IRC:CONNECTION riker.yyz.COMPANY.COM
{A3D0341}>
 TRAILING-ARGUMENT     "riker.yyz.COMPANY.COM"
 ARGUMENTS             NIL
 COMMAND               "PING"
 HOST                  ""
 USER                  ""
 SOURCE                ""
NILGot PING message.
"riker.yyz.COMPANY.COM" is a vector with 26 elements.
Its element type is specialized to CHARACTER.
Sending PONG: NILUNHANDLED-EVENT:3311097683: PING: "riker.yyz.COMPANY.COM"

I changed my company's name, because I'm not sure how they feel about
Lisp in the workplace. ;)

Not knowing the code, it's difficult for me to debug this much
further.  It appears that everything is working correctly, but the IRC
server kicks the bot off the channel after a few minutes.

Any advice you have on starting to debug this problem would be greatly
appreciated.

Sincerely,
Eric
** 
Eric Moncrieff                                           eric at ping.ca

"The totalitarian message is being transmitted while you're zoned out
in front of the television watching the feelies, high on soma -- which
is some combination of Prozac and Budweiser."  --John Perry Barlow



More information about the cl-irc-devel mailing list