]> jfr.im git - irc/quakenet/snircd-patchqueue.git/commitdiff
welcome: do not recheck timestamps and text when the source is a local user
authorwiebe <redacted>
Wed, 7 Apr 2010 10:23:01 +0000 (12:23 +0200)
committerwiebe <redacted>
Wed, 7 Apr 2010 10:23:01 +0000 (12:23 +0200)
welcome.patch

index e627191b2c942ad420ea29b66c02c228fcbdb452..af396e0e5dba886d114b909d1f74738c67f6990b 100644 (file)
@@ -776,7 +776,7 @@ diff -r 8c7c9ff0f0ca ircd/s_user.c
 diff -r 8c7c9ff0f0ca ircd/welcome.c
 --- /dev/null
 +++ b/ircd/welcome.c
-@@ -0,0 +1,609 @@
+@@ -0,0 +1,611 @@
 +/*
 + * IRC - Internet Relay Chat, ircd/welcome.c
 + * Copyright (C) 1990 Jarkko Oikarinen and
@@ -1204,16 +1204,18 @@ diff -r 8c7c9ff0f0ca ircd/welcome.c
 +       *   welcomeTS greater than or equal to timestamp, take welcomeTS+1 as timestamp
 +       *   else the change is not accepted upstream because of the older TS
 +       */
-+      if (MyUser(sptr) && WelcomeTS(namearray) >= timestamp)
-+        timestamp = WelcomeTS(namearray) +1;
++      if (MyUser(sptr)) {
++        if (WelcomeTS(namearray) >= timestamp)
++          timestamp = WelcomeTS(namearray) +1;
++      }
 +
 +      /* compare timestamps, ignore welcome when:
 +       *  we got a newer one
 +       *  or when timestamps are the same and our text is 'smaller'
 +       */
-+      if ((timestamp < WelcomeTS(namearray)) ||                /* we got a newer one */
-+         ((timestamp == WelcomeTS(namearray)) &&               /* same timestamp */
-+          (ircd_strcmp(WelcomeText(namearray), text) < 0))) {  /* our text is 'smaller' */
++      else if ((timestamp < WelcomeTS(namearray)) ||                /* we got a newer one */
++              ((timestamp == WelcomeTS(namearray)) &&               /* same timestamp */
++               (ircd_strcmp(WelcomeText(namearray), text) < 0))) {  /* our text is 'smaller' */
 +        /* burst or burst ack, cptr gets our version from the burst */
 +        if (IsBurstOrBurstAck(cptr))
 +          return 0;