aboutsummaryrefslogtreecommitdiffstats
path: root/modules/cloak.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-08 17:01:22 +0000
committerGravatar Sadie Powell2026-03-08 17:47:44 +0000
commitbb1e5a7b60ea200ddae99f263a38a219879f9617 (patch)
treea5cecddf75a3458447d09ca1fa2f859c4486ddec /modules/cloak.cpp
parentRemove 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/cloak.cpp')
-rw-r--r--modules/cloak.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/cloak.cpp b/modules/cloak.cpp
index 0222f6548..6c436da7f 100644
--- a/modules/cloak.cpp
+++ b/modules/cloak.cpp
@@ -289,11 +289,11 @@ public:
bool OnModeChange(User* source, User* dest, Channel* channel, Modes::Change& change) override
{
// For remote users blindly allow this
- LocalUser* user = IS_LOCAL(dest);
+ auto* user = dest->AsLocal();
if (!user)
{
// Remote setters broadcast mode before host while local setters do the opposite.
- active = IS_LOCAL(source) ? change.adding : !change.adding;
+ active = source->IsLocal() ? change.adding : !change.adding;
dest->SetMode(this, change.adding);
return true;
}
@@ -354,7 +354,7 @@ private:
{
user->SetMode(cloakmode, false);
- auto* luser = IS_LOCAL(user);
+ auto* luser = user->AsLocal();
if (luser)
{
Modes::ChangeList changelist;
@@ -478,7 +478,7 @@ public:
ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask, bool full) override
{
- LocalUser* lu = IS_LOCAL(user);
+ auto* lu = user->AsLocal();
if (!lu)
return MOD_RES_PASSTHRU; // We don't have cloaks for remote users.