aboutsummaryrefslogtreecommitdiff
path: root/modules/dccallow.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/dccallow.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/dccallow.cpp')
-rw-r--r--modules/dccallow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/dccallow.cpp b/modules/dccallow.cpp
index 71626bef4..5f14a3464 100644
--- a/modules/dccallow.cpp
+++ b/modules/dccallow.cpp
@@ -124,7 +124,7 @@ public:
if (container->extype != this->extype)
return;
- LocalUser* user = IS_LOCAL(static_cast<User*>(container));
+ auto* user = static_cast<User*>(container)->AsLocal();
if (!user)
return;
@@ -348,7 +348,7 @@ public:
user->WriteNumeric(RPL_HELPTXT, "*", helpline);
user->WriteNumeric(RPL_ENDOFHELP, "*", "End of DCCALLOW HELP");
- LocalUser* localuser = IS_LOCAL(user);
+ auto* localuser = user->AsLocal();
if (localuser)
localuser->CommandFloodPenalty += 4000;
}
@@ -410,7 +410,7 @@ public:
ModResult OnUserPreMessage(User* user, MessageTarget& target, MessageDetails& details) override
{
- if (!IS_LOCAL(user))
+ if (!user->IsLocal())
return MOD_RES_PASSTHRU;
if (target.type == MessageTarget::TYPE_USER)