summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-05-22 06:29:50 +0100
committerSadie Powell <sadie@witchery.services>2021-05-22 06:29:50 +0100
commitc7b938502295ddc5b2c89e0854d8c5c19ede32dc (patch)
tree5d069744c44a6b2dde2a5856dd41afab64b47c1b /src/modules
parent061d54f38e2ea9044935dfd6b8c208e7f4a3a958 (diff)
Only check for a join time if a user is actually in the channel.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_delayjoin.cpp5
1 files changed, 4 insertions, 1 deletions
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) */