1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 20:23:14 +02:00

Fix toggling topiclock when the channel setting is changed

This commit is contained in:
Adam
2013-04-06 15:26:52 -05:00
parent f71c7865fc
commit 0b3b9fe128
2 changed files with 18 additions and 2 deletions
+10
View File
@@ -15,12 +15,22 @@ class CommandCSTopic : public Command
{
void Lock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock on"));
if (MOD_RESULT == EVENT_STOP)
return;
ci->ExtendMetadata("TOPICLOCK");
source.Reply(_("Topic lock option for %s is now \002on\002."), ci->name.c_str());
}
void Unlock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
EventReturn MOD_RESULT;
FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, "topiclock off"));
if (MOD_RESULT == EVENT_STOP)
return;
ci->Shrink("TOPICLOCK");
source.Reply(_("Topic lock option for %s is now \002off\002."), ci->name.c_str());
}