diff options
| author | 2026-03-08 17:01:22 +0000 | |
|---|---|---|
| committer | 2026-03-08 17:47:44 +0000 | |
| commit | bb1e5a7b60ea200ddae99f263a38a219879f9617 (patch) | |
| tree | a5cecddf75a3458447d09ca1fa2f859c4486ddec /modules/clearchan.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/clearchan.cpp')
| -rw-r--r-- | modules/clearchan.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/clearchan.cpp b/modules/clearchan.cpp index fef47a21c..fc822bd79 100644 --- a/modules/clearchan.cpp +++ b/modules/clearchan.cpp @@ -72,7 +72,7 @@ public: const std::string reason = parameters.size() > 2 ? parameters.back() : "Clearing " + chan->name; if (!user->server->IsSilentService()) - ServerInstance->SNO.WriteToSnoMask((IS_LOCAL(user) ? 'a' : 'A'), user->nick + " has cleared \002" + chan->name + "\002 (" + method + "): " + reason); + ServerInstance->SNO.WriteToSnoMask((user->IsLocal() ? 'a' : 'A'), user->nick + " has cleared \002" + chan->name + "\002 (" + method + "): " + reason); user->WriteNotice("Clearing \002" + chan->name + "\002 (" + method + "): " + reason); @@ -102,7 +102,7 @@ public: const Channel::MemberMap::iterator currit = i; ++i; - if (!IS_LOCAL(curr) || curr->IsOper()) + if (!curr->IsLocal() || curr->IsOper()) continue; // If kicking users, remove them and skip the QuitUser() @@ -178,7 +178,7 @@ public: for (const auto& [member, _] : cmd.activechan->GetUsers()) { - LocalUser* curr = IS_LOCAL(member); + auto* curr = member->AsLocal(); if (!curr) continue; @@ -207,7 +207,7 @@ public: User* leaving = memb->user; for (const auto& [curr, _] : memb->chan->GetUsers()) { - if ((IS_LOCAL(curr)) && (!curr->IsOper()) && (curr != leaving)) + if ((curr->IsLocal()) && (!curr->IsOper()) && (curr != leaving)) excepts.insert(curr); } } |
