]> jfr.im git - irc/quakenet/newserv.git/commitdiff
More correct fix for topic setting - reusing the same TS is OK, just don't ever set...
authorsplidge <redacted>
Wed, 2 Apr 2008 13:02:44 +0000 (14:02 +0100)
committersplidge <redacted>
Wed, 2 Apr 2008 13:02:44 +0000 (14:02 +0100)
localuser/localuserchannel.c

index bacb55b44c2e761207c573416b7cb60e9015b050..59c2a841180a08aa513ba6208b3e4014f46b2bd9 100644 (file)
@@ -909,11 +909,11 @@ void localsettopic(nick *np, channel *cp, char *topic) {
 
   cp->topic=getsstring(topic,TOPICLEN);
 
-  /* Guarantee that the topic timestamp is greater than the old one. */
-  if (cp->topictime >= now) {
-    cp->topictime++;
-  } else {
-    cp->topictime=getnettime();
+  /* Update the topic time iff the old time was in the past.  This 
+   * means if we are bouncing a topic with a TS 1sec newer than ours 
+   * we won't use an old timestamp */
+  if (cp->topictime < now) {
+    cp->topictime=now;
   }
   
   if (connected) {