summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-03-21 21:02:03 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-03-21 21:02:03 +0000
commit250c3f8ab193f3cc90290b81a54f80c516da7225 (patch)
tree677ed69db8d69ce0ddd6b875c43893baa11eb62f /src
parenta53f209c7ff5935426b7fc50815a32efaba5a530 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/channels.c10
1 files changed, 10 insertions, 0 deletions
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;