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. --- src/commands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands.cpp') diff --git a/src/commands.cpp b/src/commands.cpp index d84937d49..f2ec94ab6 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -63,7 +63,7 @@ bool CommandParser::LoopCall(User* user, Command* handler, const CommandBase::Pa irc::commasepstream items2(extra != SIZE_MAX ? parameters[extra] : "", true); std::string item; size_t max = 0; - LocalUser* localuser = IS_LOCAL(user); + auto* localuser = user->AsLocal(); /* Attempt to iterate these lists and call the command handler * for every parameter or parameter pair until there are no more @@ -123,7 +123,7 @@ CmdResult CommandParser::CallHandler(const std::string& commandname, const Comma if (parameters.size() >= handler->min_params) { bool bOkay = true; - if (IS_LOCAL(user)) + if (user->IsLocal()) bOkay = handler->IsUsableBy(user); if (bOkay) -- cgit v1.3.1-10-gc9f91