Author: Isomer <isomer@coders.net>
authorPerry Lorier <isomer@undernet.org>
Sat, 1 Apr 2000 08:54:11 +0000 (08:54 +0000)
committerPerry Lorier <isomer@undernet.org>
Sat, 1 Apr 2000 08:54:11 +0000 (08:54 +0000)
Log message:

oops! Someone forgot to put m_pong into the parse array.  Wasn't me!  So
undernet happily ignores all pongs... What fun!

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@126 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/ircd.c
ircd/parse.c

index d58a860fb75e6c189ad7a9339037d7183107b6b1..f603b52a7514f2a473fae956d773cfdfb335273b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-03-30  Perry Lorier <isomer@coders.net>
+       * ircd/parse.c: fixed mystifying ping bug thats been plaguing us
+       for so long.  Remember: m_ping MUST be in the parse array. :)
+
 2000-03-30  Perry Lorier <isomer@coders.net>
        * ircd/ircd.c: test in check_pings was wrong.  I move that we
        disallow cvs commit after 10pm localtime....
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.55 2000-04-01 08:02:33 isomer Exp $
+# $Id: ChangeLog,v 1.56 2000-04-01 08:54:11 isomer Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index c471135887a0ad501e7bf3cd032edce0fe96efe7..94f49fa8234b556dd35159abe5565549b7d23c3b 100644 (file)
@@ -304,7 +304,7 @@ static time_t check_pings(void)
    /* Ok, the thing that will happen most frequently, is that someone will
     * have sent something recently.  Cover this first for speed.
     */
-   if (CurrentTime-cptr->lasttime <= max_ping) {
+   if (CurrentTime-cptr->lasttime < max_ping) {
        expire=cptr->lasttime + max_ping;
        if (next_check<expire) 
          next_check=expire;
@@ -312,7 +312,7 @@ static time_t check_pings(void)
    }
 
    /* Quit the client after max_ping*2 - they should have answered by now */
-   if (CurrentTime-cptr->lasttime > (max_ping*2) ) {
+   if (CurrentTime-cptr->lasttime >= (max_ping*2) ) {
       
       /* If it was a server, then tell ops about it. */
       if (IsServer(cptr) || IsConnecting(cptr) || IsHandshake(cptr))
@@ -355,7 +355,7 @@ static time_t check_pings(void)
       cptr->lasttime = CurrentTime - max_ping;
       
       if (IsUser(cptr))
-        sendto_one(cptr, "PING :%s", me.name);
+        sendto_one(cptr, MSG_PING " :%s", me.name);
       else
         sendto_one(cptr, "%s " TOK_PING " :%s", NumServ(&me), me.name);
     } /* of if not ping sent... */
index 3654e4028b48500ab59ce8a7811f3bbad68be1a2..18bbfb161f5732eff0d9cdab6d266170cb797965 100644 (file)
@@ -199,7 +199,7 @@ struct Message msgtab[] = {
     TOK_PONG,
     0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0,
     /* UNREG, CLIENT, SERVER, OPER, SERVICE */
-    { mr_pong, m_ignore, ms_pong, m_ignore, m_ignore }
+    { mr_pong, m_pong, ms_pong, m_ignore, m_ignore }
   },
   {
     MSG_ERROR,