+ else
+ {
+ std::vector<std::string> parameters;
+ parameters.push_back(channel->name);
+ parameters.push_back("-k");
+ parameters.push_back(channel->GetModeParameter('k'));
+ ServerInstance->SendMode(parameters, ServerInstance->FakeClient);
+ }
+ }
+}
+
+void ModeChannelKey::RemoveMode(User*, irc::modestacker* stack)
+{
+}
+
+ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, std::string ¶meter, bool adding)
+{
+ bool exists = channel->IsModeSet('k');
+ if (IS_LOCAL(source))
+ {
+ if (exists == adding)
+ return MODEACTION_DENY;
+ if (exists && (parameter != channel->GetModeParameter('k')))