diff options
author | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-01-04 16:21:15 +0000 |
---|---|---|
committer | geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-01-04 16:21:15 +0000 |
commit | bb9c7b1c7b9dfafef7637f5dc299a45496d09ac2 (patch) | |
tree | cb970715456b51086418aab83a3ab5e0b44f19eb /src | |
parent | 8114b5be040dfdd07a53abc96e9fddc04c564687 (diff) |
BUILD : 1.7.6 (520) BUGS : 265 NOTES : Fixed a few issues with chanserv, botserv, symbiosis, and topics
git-svn-id: svn://svn.anope.org/anope/trunk@520 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@374 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/chanserv.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/chanserv.c b/src/chanserv.c index 1247463e1..4368fb610 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -1751,13 +1751,13 @@ void restore_topic(char *chan) return; if (c->topic) free(c->topic); - if (ci->last_topic) { + if ((ci->last_topic) && !(ci->flags & CI_TOPICLOCK)) { c->topic = sstrdup(ci->last_topic); strscpy(c->topic_setter, ci->last_topic_setter, NICKMAX); c->topic_time = ci->last_topic_time; } else { c->topic = NULL; - strscpy(c->topic_setter, s_ChanServ, NICKMAX); + strscpy(c->topic_setter, whosends(ci), NICKMAX); } if (ircd->join2set) { if (whosends(ci) == s_ChanServ) { @@ -1795,12 +1795,16 @@ int check_topiclock(Channel * c, time_t topic_time) if (c->topic) free(c->topic); - if (ci->last_topic) + if (ci->last_topic) { c->topic = sstrdup(ci->last_topic); - else + strscpy(c->topic_setter, ci->last_topic_setter, NICKMAX); + } else { c->topic = NULL; + /* Bot assigned & Symbiosis ON?, the bot will set the topic - doc */ + /* Altough whosends() also checks for BSMinUsers -GD */ + strscpy(c->topic_setter, whosends(ci), NICKMAX); + } - strscpy(c->topic_setter, ci->last_topic_setter, NICKMAX); if (ircd->topictsforward) { /* Because older timestamps are rejected */ /* Some how the topic_time from do_topic is 0 set it to current + 1 */ @@ -1810,7 +1814,11 @@ int check_topiclock(Channel * c, time_t topic_time) c->topic_time = topic_time + 1; } } else { - c->topic_time = ci->last_topic_time; + /* If no last topic, we can't use last topic time! - doc */ + if (ci->last_topic) + c->topic_time = ci->last_topic_time; + else + c->topic_time = time(NULL) + 1; } if (ircd->join2set) { |