diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-01-05 19:51:20 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-01-05 19:51:20 +0000 |
commit | db826b63e1e27e47c9f0c28b7d9593221837407e (patch) | |
tree | 41a27975f499a4b802bd54e8a189fe182beef673 /src | |
parent | 8188843d093ee950eb57ae3b9a2b41e799337a7e (diff) |
BUILD : 1.7.6 (523) BUGS : 267 NOTES : Internal last topic was not emptied on channel creation when KEEPTOPIC was off
git-svn-id: svn://svn.anope.org/anope/trunk@523 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@377 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/chanserv.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/chanserv.c b/src/chanserv.c index fe12ee9db..073cb2f2a 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -1747,11 +1747,21 @@ void restore_topic(char *chan) Channel *c = findchan(chan); ChannelInfo *ci; - if (!c || !(ci = c->ci) || !(ci->flags & CI_KEEPTOPIC)) + if (!c || !(ci = c->ci)) return; + if (!(ci->flags & CI_KEEPTOPIC)) { + /* We need to reset the topic here, since it's currently empty and + * should be updated with a TOPIC from the IRCd soon. -GD + */ + ci->last_topic = NULL; + strscpy(ci->last_topic_setter, whosends(ci), NICKMAX); + ci->last_topic_time = time(NULL); + /* And we still return... -GD */ + return; + } if (c->topic) free(c->topic); - if ((ci->last_topic) && !(ci->flags & CI_TOPICLOCK)) { + if (ci->last_topic) { c->topic = sstrdup(ci->last_topic); strscpy(c->topic_setter, ci->last_topic_setter, NICKMAX); c->topic_time = ci->last_topic_time; |