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/sacommands.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/sacommands.cpp') 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() : ""; -- cgit v1.3.1-10-gc9f91