From 1dfead3b2cc9e8c603f6ad6f7216576a2ce361fb Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 16 Apr 2013 13:20:24 +0200 Subject: m_kicknorejoin Store and compare uuids instead pointers Fixes the off chance scenario where we disallow a join because a previously kicked user has quit and the User who is trying to join happens to be allocated at the exact same memory location --- src/modules/m_kicknorejoin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 9614b84f2..c754aa0f0 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -27,7 +27,7 @@ /* $ModDesc: Provides channel mode +J (delay rejoin after kick) */ -typedef std::map delaylist; +typedef std::map delaylist; /** Handles channel mode +J */ @@ -108,7 +108,7 @@ public: { if (iter->second > ServerInstance->Time()) { - if (iter->first == user) + if (iter->first == user->uuid) { std::string modeparam = chan->GetModeParameter(&kr); user->WriteNumeric(ERR_DELAYREJOIN, "%s %s :You must wait %s seconds after being kicked to rejoin (+J)", @@ -141,7 +141,7 @@ public: dl = new delaylist; kr.ext.set(memb->chan, dl); } - (*dl)[memb->user] = ServerInstance->Time() + ConvToInt(memb->chan->GetModeParameter(&kr)); + (*dl)[memb->user->uuid] = ServerInstance->Time() + ConvToInt(memb->chan->GetModeParameter(&kr)); } } -- cgit v1.2.3