aboutsummaryrefslogtreecommitdiff
path: root/modules/sacommands.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/sacommands.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/sacommands.cpp')
-rw-r--r--modules/sacommands.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/sacommands.cpp b/modules/sacommands.cpp
index 483bcac13..f6c9177be 100644
--- a/modules/sacommands.cpp
+++ b/modules/sacommands.cpp
@@ -89,7 +89,7 @@ public:
}
const auto& targetchan = parameters[channelindex];
- if (IS_LOCAL(user) && !ServerInstance->Channels.IsChannel(targetchan))
+ if (user->IsLocal() && !ServerInstance->Channels.IsChannel(targetchan))
{
user->WriteRemoteNumeric(ERR_BADCHANMASK, targetchan, "Invalid channel name");
return CmdResult::FAILURE;
@@ -102,7 +102,7 @@ public:
return CmdResult::FAILURE;
}
- auto* ltarget = IS_LOCAL(target);
+ auto* ltarget = target->AsLocal();
if (!ltarget)
return CmdResult::SUCCESS; // User will be handled by their own server.
@@ -170,7 +170,7 @@ public:
return CmdResult::FAILURE;
}
- if (!IS_LOCAL(target))
+ if (!target->IsLocal())
return CmdResult::SUCCESS; // User will be handled by their own server.
const std::string reason(parameters.size() > 2 ? parameters.back() : target->nick, 0, ServerInstance->Config->Limits.MaxKick);
@@ -315,7 +315,7 @@ public:
return CmdResult::FAILURE;
}
- if (!IS_LOCAL(target))
+ if (!target->IsLocal())
return CmdResult::SUCCESS; // User will be handled by their own server.
if (!target->ChangeNick(targetnewnick))
@@ -381,7 +381,7 @@ public:
return CmdResult::FAILURE;
}
- if (!IS_LOCAL(target))
+ if (!target->IsLocal())
return CmdResult::SUCCESS; // User will be handled by their own server.
const auto& reason = parameters.size() > 2 ? parameters.back() : "";
@@ -435,7 +435,7 @@ public:
return CmdResult::FAILURE;
}
- if (!IS_LOCAL(target))
+ if (!target->IsLocal())
return CmdResult::SUCCESS; // User will be handled by their own server.
const auto& reason = parameters.size() > 2 ? parameters.back() : "";