diff options
| author | 2026-03-08 17:01:22 +0000 | |
|---|---|---|
| committer | 2026-03-08 17:47:44 +0000 | |
| commit | bb1e5a7b60ea200ddae99f263a38a219879f9617 (patch) | |
| tree | a5cecddf75a3458447d09ca1fa2f859c4486ddec /src/commands.cpp | |
| parent | Remove 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 'src/commands.cpp')
| -rw-r--r-- | src/commands.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
