* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * InspIRCd: (C) 2002-2008 InspIRCd Development Team
* See: http://www.inspircd.org/wiki/index.php/Credits
*
* This program is free but copyrighted software; see
}
}
-void ModeChannelKey::RemoveMode(Channel* channel)
+void ModeChannelKey::RemoveMode(Channel* channel, irc::modestacker* stack)
{
/** +k needs a parameter when being removed,
* so we have a special-case RemoveMode here for it
if (channel->IsModeSet(this->GetModeChar()))
{
- sprintf(moderemove,"-%c",this->GetModeChar());
- ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+ if (stack)
+ stack->Push(this->GetModeChar(), channel->key);
+ else
+ {
+ sprintf(moderemove,"-%c",this->GetModeChar());
+ ServerInstance->SendMode(parameters, 3, ServerInstance->FakeClient);
+ }
}
}
-void ModeChannelKey::RemoveMode(User*)
+void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack)
{
}
return (their_param < our_param);
}
-ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding)
+ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding, bool servermode)
{
if ((channel->modes[CM_KEY] != adding) || (!IS_LOCAL(source)))
{