From: Joseph Bongaarts Date: Thu, 7 Mar 2002 21:26:11 +0000 (+0000) Subject: Author: Run By way of Ghostwolf X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=d9cacf32025d023609f4f4f5036b4409447d90c0;p=ircu2.10.12-pk.git Author: Run By way of Ghostwolf Log message: * /ircd/ircd.c: check_pings: First check if a PING was sent at all. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@666 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index bd548ba..ac8b88d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2002-02-27 Carlo Wood + + * /ircd/ircd.c: check_pings: First check if a PING was sent at all. 2002-03-01 Carlo Wood diff --git a/ircd/ircd.c b/ircd/ircd.c index 1300dec..3696538 100644 --- a/ircd/ircd.c +++ b/ircd/ircd.c @@ -355,17 +355,6 @@ static void check_pings(struct Event* ev) { continue; } - /* Quit the client after max_ping*2 - they should have answered by now */ - if (CurrentTime-cli_lasttime(cptr) >= (max_ping*2) ) { - /* If it was a server, then tell ops about it. */ - if (IsServer(cptr) || IsConnecting(cptr) || IsHandshake(cptr)) - sendto_opmask_butone(0, SNO_OLDSNO, - "No response from %s, closing link", - cli_name(cptr)); - exit_client_msg(cptr, cptr, &me, "Ping timeout"); - continue; - } - /* Unregistered clients pingout after max_ping seconds, they don't * get given a second chance - if they were then people could not quite * finish registration and hold resources without being subject to k/g @@ -401,6 +390,17 @@ static void check_pings(struct Event* ev) { sendcmdto_one(&me, CMD_PING, cptr, ":%s", cli_name(&me)); } + /* Quit the client after max_ping*2 - they should have answered by now */ + if (CurrentTime-cli_lasttime(cptr) >= (max_ping*2) ) { + /* If it was a server, then tell ops about it. */ + if (IsServer(cptr) || IsConnecting(cptr) || IsHandshake(cptr)) + sendto_opmask_butone(0, SNO_OLDSNO, + "No response from %s, closing link", + cli_name(cptr)); + exit_client_msg(cptr, cptr, &me, "Ping timeout"); + continue; + } + expire = cli_lasttime(cptr) + max_ping * 2; if (expire < next_check) next_check=expire;