From c7b938502295ddc5b2c89e0854d8c5c19ede32dc Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 22 May 2021 06:29:50 +0100 Subject: Only check for a join time if a user is actually in the channel. --- src/modules/m_delayjoin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp index 55398710c..72bdad155 100644 --- a/src/modules/m_delayjoin.cpp +++ b/src/modules/m_delayjoin.cpp @@ -213,8 +213,11 @@ void ModuleDelayJoin::OnUserMessage(User* user, const MessageTarget& target, con void DelayJoinMode::RevealUser(User* user, Channel* chan) { Membership* memb = chan->GetUser(user); + if (!memb) + return; + time_t jointime = unjoined.set(memb, 0); - if (!memb || !jointime) + if (!jointime) return; /* Display the join to everyone else (the user who joined got it earlier) */ -- cgit v1.2.3