mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 19:19:02 -04:00
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
This commit is contained in:
parent
4b81b4004d
commit
1dfead3b2c
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user