mirror of
https://github.com/anope/anope.git
synced 2026-07-04 20:33:12 +02:00
Replace some get calls on <bool> extenisble types with hasext
This commit is contained in:
@@ -100,11 +100,11 @@ class CommandCSTopic : public Command
|
||||
{
|
||||
const Anope::string &topic = params.size() > 2 ? params[2] : "";
|
||||
|
||||
bool *has_topiclock = topiclock->Get(ci);
|
||||
bool has_topiclock = topiclock->HasExt(ci);
|
||||
topiclock->Unset(ci);
|
||||
ci->c->ChangeTopic(source.GetNick(), topic, Anope::CurTime);
|
||||
if (has_topiclock)
|
||||
topiclock->Set(ci, *has_topiclock);
|
||||
topiclock->Set(ci);
|
||||
|
||||
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 : "");
|
||||
|
||||
Reference in New Issue
Block a user