summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-16 13:20:24 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-16 13:20:24 +0200
commit1dfead3b2cc9e8c603f6ad6f7216576a2ce361fb (patch)
tree652d9ba1ec124036251b1816d708526ecb5c8e31 /src/modules
parent4b81b4004d086555885d5e4a2541b0a92eb4a9ae (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_kicknorejoin.cpp6
1 files 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<User*, time_t> delaylist;
+typedef std::map<std::string, time_t> 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));
}
}