diff options
| author | 2026-03-08 17:01:22 +0000 | |
|---|---|---|
| committer | 2026-03-08 17:47:44 +0000 | |
| commit | bb1e5a7b60ea200ddae99f263a38a219879f9617 (patch) | |
| tree | a5cecddf75a3458447d09ca1fa2f859c4486ddec /modules/cap.cpp | |
| parent | Remove the unused remote user finding methods. (diff) | |
| download | inspircd++-bb1e5a7b60ea200ddae99f263a38a219879f9617.tar.gz inspircd++-bb1e5a7b60ea200ddae99f263a38a219879f9617.tar.bz2 inspircd++-bb1e5a7b60ea200ddae99f263a38a219879f9617.zip | |
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/cap.cpp')
| -rw-r--r-- | modules/cap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/cap.cpp b/modules/cap.cpp index f171d89a4..e4aa90609 100644 --- a/modules/cap.cpp +++ b/modules/cap.cpp @@ -284,8 +284,8 @@ namespace { std::string SerializeCaps(const Extensible* container, bool human) { - // XXX: Cast away the const because IS_LOCAL() doesn't handle it - LocalUser* user = IS_LOCAL(const_cast<User*>(static_cast<const User*>(container))); + // XXX: Cast away the const because HandleList doesn't handle it + auto* user = const_cast<User*>(static_cast<const User*>(container))->AsLocal(); if (!user) return {}; @@ -333,7 +333,7 @@ void Cap::ExtItem::FromInternal(Extensible* container, const std::string& value) if (container->extype != this->extype) return; - LocalUser* user = IS_LOCAL(static_cast<User*>(container)); + auto* user = static_cast<User*>(container)->AsLocal(); if (!user) return; // Can't happen |
