summaryrefslogtreecommitdiff
path: root/src/modules/m_chanprotect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_chanprotect.cpp')
-rw-r--r--src/modules/m_chanprotect.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index daa728e61..0cc4fe8d7 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -62,7 +62,7 @@ class FounderProtectBase
return std::make_pair(false, parameter);
}
- void RemoveMode(Channel* channel, char mc)
+ void RemoveMode(Channel* channel, char mc, irc::modestacker* stack)
{
CUList* cl = channel->GetUsers();
std::string item = extend + std::string(channel->name);
@@ -75,10 +75,16 @@ class FounderProtectBase
{
if (i->first->GetExt(item))
{
- modestack.Push(mc, i->first->nick);
+ if (stack)
+ stack->Push(mc, i->first->nick);
+ else
+ modestack.Push(mc, i->first->nick);
}
}
+ if (stack)
+ return;
+
while (modestack.GetStackedLine(stackresult))
{
for (size_t j = 0; j < stackresult.size(); j++)
@@ -165,12 +171,12 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
return FounderProtectBase::ModeSet(source, dest, channel, parameter);
}
- void RemoveMode(Channel* channel)
+ void RemoveMode(Channel* channel, irc::modestacker* stack)
{
- FounderProtectBase::RemoveMode(channel, this->GetModeChar());
+ FounderProtectBase::RemoveMode(channel, this->GetModeChar(), stack);
}
- void RemoveMode(User* user)
+ void RemoveMode(User* user, irc::modestacker* stack)
{
}
@@ -231,12 +237,12 @@ class ChanProtect : public ModeHandler, public FounderProtectBase
return FounderProtectBase::ModeSet(source, dest, channel, parameter);
}
- void RemoveMode(Channel* channel)
+ void RemoveMode(Channel* channel, irc::modestacker* stack)
{
- FounderProtectBase::RemoveMode(channel, this->GetModeChar());
+ FounderProtectBase::RemoveMode(channel, this->GetModeChar(), stack);
}
- void RemoveMode(User* user)
+ void RemoveMode(User* user, irc::modestacker* stack)
{
}