summaryrefslogtreecommitdiff
path: root/src/chanserv.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-12-28 19:12:02 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-12-28 19:12:02 +0000
commit4a5cf6e1e3a3e8031cc4980477c456ec684cb971 (patch)
tree7ca35b3ff7a3897d10f7f56a78ea0c71eca4747f /src/chanserv.c
parentf8f64944c27f09a728f2c75d3b66ca7ce1e700ae (diff)
BUILD : 1.7.19 (1322) BUGS : 685 NOTES : Applied a patch by Jilles which should fix SJOIN not always sending the correct TS
git-svn-id: svn://svn.anope.org/anope/trunk@1322 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1040 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/chanserv.c')
-rw-r--r--src/chanserv.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/chanserv.c b/src/chanserv.c
index 547f337ce..f439369e9 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -1466,10 +1466,10 @@ static void timeout_leave(Timeout * to)
* else, kickban the user with an appropriate message (could be either
* AKICK or restricted access) and return 1. Note that this is called
* _before_ the user is added to internal channel lists (so do_kick() is
- * not called).
+ * not called). The channel TS must be given for a new channel.
*/
-int check_kick(User * user, char *chan)
+int check_kick(User * user, char *chan, time_t chants)
{
ChannelInfo *ci = cs_findchan(chan);
Channel *c;
@@ -1563,8 +1563,7 @@ int check_kick(User * user, char *chan)
* c may be NULL even if it exists */
if ((!(c = findchan(chan)) || c->usercount == 0)
&& !(ci->flags & CI_INHABIT)) {
- anope_cmd_join(s_ChanServ, chan,
- (c ? c->creation_time : time(NULL)));
+ anope_cmd_join(s_ChanServ, chan, (c ? c->creation_time : chants));
t = add_timeout(CSInhabit, timeout_leave, 0);
t->data = sstrdup(chan);
ci->flags |= CI_INHABIT;
@@ -1646,7 +1645,7 @@ void restore_topic(char *chan)
}
if (ircd->join2set) {
if (whosends(ci) == s_ChanServ) {
- anope_cmd_join(s_ChanServ, chan, time(NULL));
+ anope_cmd_join(s_ChanServ, chan, c->creation_time);
anope_cmd_mode(NULL, chan, "+o %s", s_ChanServ);
}
}
@@ -1708,7 +1707,7 @@ int check_topiclock(Channel * c, time_t topic_time)
if (ircd->join2set) {
if (whosends(ci) == s_ChanServ) {
- anope_cmd_join(s_ChanServ, c->name, time(NULL));
+ anope_cmd_join(s_ChanServ, c->name, c->creation_time);
anope_cmd_mode(NULL, c->name, "+o %s", s_ChanServ);
}
}