diff options
author | Adam <Adam@anope.org> | 2012-12-27 09:43:19 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-27 09:43:19 -0500 |
commit | 7b1ae9602d0aa3053814c7d1e6f460860f5180e0 (patch) | |
tree | 27245ce4d1754ac3fe294dbb5bfe3c42b599280c /modules/commands/cs_set.cpp | |
parent | c7a22dff878cc517a34d36767df0edd77fd72c09 (diff) |
Put appendtopic and topiclock into /cs topic
Diffstat (limited to 'modules/commands/cs_set.cpp')
-rw-r--r-- | modules/commands/cs_set.cpp | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index ecd228877..5ac235c8f 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1084,62 +1084,6 @@ class CommandCSSetSuccessor : public Command } }; -class CommandCSSetTopicLock : public Command -{ - public: - CommandCSSetTopicLock(Module *creator, const Anope::string &cname = "chanserv/set/topiclock") : Command(creator, cname, 2, 2) - { - this->SetDesc(_("Topic can only be changed with TOPIC")); - this->SetSyntax(_("\037channel\037 {ON | OFF}")); - } - - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override - { - ChannelInfo *ci = ChannelInfo::Find(params[0]); - if (ci == NULL) - { - source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str()); - return; - } - - EventReturn MOD_RESULT; - FOREACH_RESULT(I_OnSetChannelOption, OnSetChannelOption(source, this, ci, params[1])); - if (MOD_RESULT == EVENT_STOP) - return; - - if (MOD_RESULT != EVENT_ALLOW && source.permission.empty() && !source.AccessFor(ci).HasPriv("SET")) - { - source.Reply(ACCESS_DENIED); - return; - } - - if (params[1].equals_ci("ON")) - { - ci->SetFlag(CI_TOPICLOCK); - source.Reply(_("Topic lock option for %s is now \002on\002."), ci->name.c_str()); - } - else if (params[1].equals_ci("OFF")) - { - ci->UnsetFlag(CI_TOPICLOCK); - source.Reply(_("Topic lock option for %s is now \002off\002."), ci->name.c_str()); - } - else - this->OnSyntaxError(source, "TOPICLOCK"); - - return; - } - - bool OnHelp(CommandSource &source, const Anope::string &) anope_override - { - this->SendSyntax(source); - source.Reply(" "); - source.Reply(_("Enables or disables the \002topic lock\002 option for a channel.\n" - "When \002topic lock\002 is set, the channel topic will be unchangable\n" - "except via the \002TOPIC\002 command.")); - return true; - } -}; - class CommandCSSASetNoexpire : public Command { public: @@ -1210,7 +1154,6 @@ class CSSet : public Module CommandCSSetSecureOps commandcssetsecureops; CommandCSSetSignKick commandcssetsignkick; CommandCSSetSuccessor commandcssetsuccessor; - CommandCSSetTopicLock commandcssettopiclock; CommandCSSASetNoexpire commandcssasetnoexpire; public: @@ -1219,7 +1162,7 @@ class CSSet : public Module CSDefChanstats(false), commandcssetdescription(this), commandcssetfounder(this), commandcssetkeeptopic(this), commandcssetpeace(this), commandcssetpersist(this), commandcssetprivate(this), commandcssetrestricted(this), commandcssetsecure(this), commandcssetsecurefounder(this), commandcssetsecureops(this), commandcssetsignkick(this), - commandcssetsuccessor(this), commandcssettopiclock(this), commandcssasetnoexpire(this) + commandcssetsuccessor(this), commandcssasetnoexpire(this) { this->SetAuthor("Anope"); |