summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.c12
-rw-r--r--src/protocol/inspircd11.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c
index aec70dfe8..87e6a8d05 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -583,8 +583,18 @@ void do_join(const char *source, int ac, char **av)
if (check_kick(user, s, time(NULL)))
continue;
+ time_t ts = time(NULL);
+
+ if (ac == 2) {
+ if (debug) {
+ alog("debug: recieved a new TS for JOIN: %ld",
+ (long int) ts);
+ }
+ ts = strtoul(av[1], NULL, 10);
+ }
+
chan = findchan(s);
- chan = join_user_update(user, chan, s, time(NULL));
+ chan = join_user_update(user, chan, s, ts);
chan_set_correct_modes(user, chan, 1);
send_event(EVENT_JOIN_CHANNEL, 3, EVENT_STOP, source, s);
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index a70044435..7f3cbb9e3 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -1297,7 +1297,7 @@ int anope_event_join(char *source, int ac, char **av)
{
if (ac != 2)
return MOD_CONT;
- do_join(source, 1, av);
+ do_join(source, ac, av);
return MOD_CONT;
}