RE: IRC client
- Posted by Kat <gertie at PELL.NET> Jan 08, 2002
- 422 views
On 8 Jan 2002, at 3:24, bensler at mail.com wrote: > > So far I am able to connect my IRC client, logon, join/part channels, > send msgs, quit a server and connect to a different one, and any other > RAW command I like. All in all it's mostly functional, but archaic :) > > But I've ran into a small problem, rather an inconvenience. I see no way > of setting the timeout value for tcp4u_connect(). I think the timeout is > about 60 seconds, but I can't change it. This can get rather annoying, > I'd like to be able to set it much lower. > Any help is appreciated. > > Also, I can't seem to be able to respond to PING's. > According to the telnet-IRC guide, the reponse is PONG <ip/socket>. > for example, this is what I am trying to do. > < PING :127.0.0.1 > > PONG 127.0.0.1 > > Just now, I've thought maybe I should try a ctcp pong. I'll try in a > minute, but I already started writing :P You prolly already found a ctcp pong will not work, the protocol is different. This is my code for handling PING-PONG: if equal(parsed_data[1],"PING") then if equal(parsed_data[2],":" & server_name) then msg(server_name,"PONG :"&server_name) else msg(parsed_data[2][2..length(parsed_data[2])],"PONG :"&server_name) end if puts(1,"PING :"&server_name&"\nPONG :"&server_name&"\n") puts(logfile,"PING :"&server_name&"\nPONG :"&server_name&"\n") flush(logfile) data = "" parsed_data = "" end if Kat