diff options
| author | Adam <Adam@anope.org> | 2013-04-06 15:26:52 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-04-06 15:26:52 -0500 |
| commit | 0b3b9fe128e63c836ff08c637735068564470b8e (patch) | |
| tree | f4ab4798c658227623929c524a59ab404621fd3f /modules/protocol | |
| parent | f71c7865fc41387d36cc1d854a5f9c40bd5ae48d (diff) | |
Fix toggling topiclock when the channel setting is changed
Diffstat (limited to 'modules/protocol')
| -rw-r--r-- | modules/protocol/inspircd20.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 2a21b9643..bbe069466 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -755,8 +755,14 @@ class ProtoInspIRCd : public Module EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting) anope_override { - if (cmd->name == "chanserv/set/topiclock" && ci->c) - SendChannelMetadata(ci->c, "topiclock", setting.equals_ci("ON") ? "1" : ""); + if (cmd->name == "chanserv/topic" && ci->c) + { + + if (setting == "topiclock on") + SendChannelMetadata(ci->c, "topiclock", "1"); + else if (setting == "topiclock off") + SendChannelMetadata(ci->c, "topiclock", "0"); + } return EVENT_CONTINUE; } |
