summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_delayjoin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index d157b97bc..db7cf40d5 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -56,8 +56,9 @@ class JoinHook : public ClientProtocol::EventHook
ModResult OnPreEventSend(LocalUser* user, const ClientProtocol::Event& ev, ClientProtocol::MessageList& messagelist) CXX11_OVERRIDE
{
const ClientProtocol::Events::Join& join = static_cast<const ClientProtocol::Events::Join&>(ev);
- const User* const u = join.GetMember()->user;
- if ((unjoined.get(u)) && (u != user))
+ const Membership* const memb = join.GetMember();
+ const User* const u = memb->user;
+ if ((unjoined.get(memb)) && (u != user))
return MOD_RES_DENY;
return MOD_RES_PASSTHRU;
}