diff options
| author | 2026-03-08 17:01:22 +0000 | |
|---|---|---|
| committer | 2026-03-08 17:47:44 +0000 | |
| commit | bb1e5a7b60ea200ddae99f263a38a219879f9617 (patch) | |
| tree | a5cecddf75a3458447d09ca1fa2f859c4486ddec /modules/override.cpp | |
| parent | Remove the unused remote user finding methods. (diff) | |
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.
Diffstat (limited to 'modules/override.cpp')
| -rw-r--r-- | modules/override.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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(); |
