Commits (1)
...@@ -107,8 +107,14 @@ else while((msg=readln())!=undefined) { /* read from stdin */ ...@@ -107,8 +107,14 @@ else while((msg=readln())!=undefined) { /* read from stdin */
while(my_server.poll(0) && (response=my_server.recvline())) while(my_server.poll(0) && (response=my_server.recvline()))
mylog(response); mylog(response);
if(my_server.sendline("PING :"+ nick)) { var token = format("%x", random(0x7fffffff));
mylog(my_server.recvline()); if(my_server.sendline("PING :"+ token)) {
while(my_server.poll(5)) {
var response = my_server.recvline();
mylog(response);
if(response == (":" + server + " PONG " + server + " :" + token))
break;
}
} }
IRC_quit(my_server); IRC_quit(my_server);
......