From bb1e5a7b60ea200ddae99f263a38a219879f9617 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 8 Mar 2026 17:01:22 +0000 Subject: Replace IS_* with member functions. - All user types get an Is* function. - Only local users are cast using the old function so only local users get an As* function. --- modules/override.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/override.cpp') diff --git a/modules/override.cpp b/modules/override.cpp index 02428319c..31f7deced 100644 --- a/modules/override.cpp +++ b/modules/override.cpp @@ -75,8 +75,8 @@ public: bool OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override { bool res = SimpleUserMode::OnModeChange(source, dest, channel, change); - if (change.adding && res && IS_LOCAL(dest) && timeout) - ext.Set(dest, new UnsetTimer(IS_LOCAL(dest), timeout, *this)); + if (change.adding && res && dest->IsLocal() && timeout) + ext.Set(dest, new UnsetTimer(dest->AsLocal(), timeout, *this)); return res; } }; @@ -163,7 +163,7 @@ public: ModResult OnPreTopicChange(User* source, Channel* channel, const std::string& topic) override { - if (IS_LOCAL(source) && source->IsOper() && CanOverride(source, "TOPIC")) + if (source->IsLocal() && source->IsOper() && CanOverride(source, "TOPIC")) { if (!channel->HasUser(source) || (channel->IsModeSet(topiclock) && channel->GetPrefixValue(source) < HALFOP_VALUE)) { @@ -196,7 +196,7 @@ public: { if (!channel) return MOD_RES_PASSTHRU; - if (!source->IsOper() || !IS_LOCAL(source)) + if (!source->IsOper() || !source->IsLocal()) return MOD_RES_PASSTHRU; const Modes::ChangeList::List& list = modes.getlist(); -- cgit v1.3.1-10-gc9f91