-bool ModeChannelKey::CheckTimeStamp(time_t theirs, time_t ours, const std::string &their_param, const std::string &our_param, chanrec* 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()))
+ {
+ if (stack)
+ stack->Push(this->GetModeChar(), channel->key);
+ else
+ {
+ std::vector<std::string> parameters; parameters.push_back(channel->name); parameters.push_back("-k"); parameters.push_back(channel->key);
+ ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
+ }
+ }
+}
+
+void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack)
+{
+}
+
+bool ModeChannelKey::CheckTimeStamp(time_t, time_t, const std::string &their_param, const std::string &our_param, Channel*)