summaryrefslogtreecommitdiff
path: root/modules/commands/cs_topic.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-01-21 22:31:16 -0500
committerAdam <Adam@anope.org>2013-01-21 22:31:16 -0500
commitddaa001dafb5122e6e363e4acbbe6ce045b7b104 (patch)
tree0364a76606ac6e2881ebd663601ce260f7c1101e /modules/commands/cs_topic.cpp
parent51c049e1a738e9124bab3961f35b830906517421 (diff)
Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums
Diffstat (limited to 'modules/commands/cs_topic.cpp')
-rw-r--r--modules/commands/cs_topic.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp
index bccece802..6518b0959 100644
--- a/modules/commands/cs_topic.cpp
+++ b/modules/commands/cs_topic.cpp
@@ -15,13 +15,13 @@ class CommandCSTopic : public Command
{
void Lock(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
- ci->SetFlag(CI_TOPICLOCK);
+ 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)
{
- ci->UnsetFlag(CI_TOPICLOCK);
+ ci->Shrink("TOPICLOCK");
source.Reply(_("Topic lock option for %s is now \002off\002."), ci->name.c_str());
}
@@ -29,11 +29,11 @@ class CommandCSTopic : public Command
{
const Anope::string &topic = params.size() > 2 ? params[2] : "";
- bool has_topiclock = ci->HasFlag(CI_TOPICLOCK);
- ci->UnsetFlag(CI_TOPICLOCK);
+ bool has_topiclock = ci->HasExt("TOPICLOCK");
+ ci->Shrink("TOPICLOCK");
ci->c->ChangeTopic(source.GetNick(), topic, Anope::CurTime);
if (has_topiclock)
- ci->SetFlag(CI_TOPICLOCK);
+ ci->ExtendMetadata("TOPICLOCK");
bool override = !source.AccessFor(ci).HasPriv("TOPIC");
Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << (!topic.empty() ? "to change the topic to: " : "to unset the topic") << (!topic.empty() ? topic : "");