1
0
mirror of https://github.com/anope/anope.git synced 2026-07-09 06:43:13 +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
+8 -2
View File
@@ -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;
}