From: wiebe Date: Wed, 7 Apr 2010 10:23:01 +0000 (+0200) Subject: welcome: do not recheck timestamps and text when the source is a local user X-Git-Url: https://jfr.im/git/irc/quakenet/snircd-patchqueue.git/commitdiff_plain/edf9cf79bb5c08e4ae1154248231c0228c755afe welcome: do not recheck timestamps and text when the source is a local user --- diff --git a/welcome.patch b/welcome.patch index e627191..af396e0 100644 --- a/welcome.patch +++ b/welcome.patch @@ -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;