mirror of
https://github.com/anope/anope.git
synced 2026-06-26 16:36:39 +02:00
Delete users and channels from the modestacker when they are destructed
This commit is contained in:
@@ -822,3 +822,18 @@ void ModeManager::ProcessModes()
|
||||
StackerObjects.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/** Delete a user or channel from the stacker
|
||||
* @param b The user/channel
|
||||
*/
|
||||
void ModeManager::StackerDel(Base *b)
|
||||
{
|
||||
for (std::list<std::pair<Base *, StackerInfo *> >::iterator it = ModeManager::StackerObjects.begin(), it_end = ModeManager::StackerObjects.end(); it != it_end; ++it)
|
||||
{
|
||||
if (b == it->first)
|
||||
{
|
||||
ModeManager::StackerObjects.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user