diff options
| author | 2026-03-08 17:01:22 +0000 | |
|---|---|---|
| committer | 2026-03-08 17:47:44 +0000 | |
| commit | bb1e5a7b60ea200ddae99f263a38a219879f9617 (patch) | |
| tree | a5cecddf75a3458447d09ca1fa2f859c4486ddec /modules/remove.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 'modules/remove.cpp')
| -rw-r--r-- | modules/remove.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/remove.cpp b/modules/remove.cpp index 0bcf897f5..65e586f0d 100644 --- a/modules/remove.cpp +++ b/modules/remove.cpp @@ -58,7 +58,7 @@ public: /* Look up the user we're meant to be removing from the channel */ User* target; - if (IS_LOCAL(user)) + if (user->IsLocal()) target = ServerInstance->Users.FindNick(username, true); else target = ServerInstance->Users.Find(username, true); @@ -91,7 +91,7 @@ public: } /* We support the +Q channel mode via. the m_nokicks module, if the module is loaded and the mode is set then disallow the /remove */ - if ((!IS_LOCAL(user)) || (!supportnokicks) || (!channel->IsModeSet(nokicksmode))) + if ((!user->IsLocal()) || (!supportnokicks) || (!channel->IsModeSet(nokicksmode))) { /* We'll let everyone remove their level and below, eg: * ops can remove ops, halfops, voices, and those with no mode (no moders actually are set to 1) @@ -100,10 +100,10 @@ public: */ ModeHandler::Rank ulevel = channel->GetPrefixValue(user); ModeHandler::Rank tlevel = channel->GetPrefixValue(target); - if ((!IS_LOCAL(user)) || ((ulevel > VOICE_VALUE) && (ulevel >= tlevel) && ((protectedrank == 0) || (tlevel < protectedrank)))) + if ((!user->IsLocal()) || ((ulevel > VOICE_VALUE) && (ulevel >= tlevel) && ((protectedrank == 0) || (tlevel < protectedrank)))) { // REMOVE will be sent to the target's server and it will reply with a PART (or do nothing if it doesn't understand the command) - if (!IS_LOCAL(target)) + if (!target->IsLocal()) { CommandBase::Params p; p.push_back(channel->name); |
