aboutsummaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2026-03-08 17:01:22 +0000
committerGravatar Sadie Powell2026-03-08 17:47:44 +0000
commitbb1e5a7b60ea200ddae99f263a38a219879f9617 (patch)
treea5cecddf75a3458447d09ca1fa2f859c4486ddec /src/usermanager.cpp
parentRemove 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/usermanager.cpp')
-rw-r--r--src/usermanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index e70e1c465..e58ffdf23 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -201,7 +201,7 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std
return;
}
- if (IS_SERVER(user))
+ if (user->IsServer())
{
ServerInstance->Logs.Debug("USERS", "BUG: Tried to quit server user: {}", user->nick);
return;
@@ -212,7 +212,7 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std
if (operquitmessage)
operquitmsg.assign(*operquitmessage);
- LocalUser* const localuser = IS_LOCAL(user);
+ auto* const localuser = user->AsLocal();
if (localuser)
{
ModResult modres;
@@ -247,9 +247,9 @@ void UserManager::QuitUser(User* user, const std::string& quitmessage, const std
else
unknown_count--;
- if (IS_LOCAL(user))
+ if (user->IsLocal())
{
- LocalUser* lu = IS_LOCAL(user);
+ auto* lu = user->AsLocal();
FOREACH_MOD(OnUserDisconnect, (lu));
lu->io->Close();
@@ -275,7 +275,7 @@ void UserManager::AddClone(User* user)
{
CloneCounts& counts = clonemap[user->GetCIDRMask()];
counts.global++;
- if (IS_LOCAL(user))
+ if (user->IsLocal())
counts.local++;
}
@@ -293,7 +293,7 @@ void UserManager::RemoveCloneCounts(User* user)
return;
}
- if (IS_LOCAL(user))
+ if (user->IsLocal())
counts.local--;
}
}