From 250c3f8ab193f3cc90290b81a54f80c516da7225 Mon Sep 17 00:00:00 2001 From: "geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Mon, 21 Mar 2005 21:02:03 +0000 Subject: BUILD : 1.7.8 (636) BUGS : NOTES : When the topic was fully identical to the topiclocked one it still was being re-set, fixed that git-svn-id: svn://svn.anope.org/anope/trunk@636 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@484 5417fbe8-f217-4b02-8779-1006273d7864 --- src/channels.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/channels.c b/src/channels.c index bd1a5e913..14cb6a396 100644 --- a/src/channels.c +++ b/src/channels.c @@ -1115,6 +1115,7 @@ void do_cmode(const char *source, int ac, char **av) void do_topic(const char *source, int ac, char **av) { Channel *c = findchan(av[0]); + ChannelInfo *ci; int ts; time_t topic_time; @@ -1140,6 +1141,15 @@ void do_topic(const char *source, int ac, char **av) /* We can be sure that the topic will be in sync here -GD */ c->topic_sync = 1; + /* If the current topic we have matches the last known topic for this + * channel exactly, there's no need to update anything and we can as + * well just return silently without updating anything. -GD + */ + if ((ac > 3) && *av[3] && (ci = c->ci) && ci->last_topic + && (strcmp(av[3], ci->last_topic) == 0) + && (strcmp(av[1], ci->last_topic_setter) == 0)) + return; + if (check_topiclock(c, topic_time)) return; -- cgit