aboutsummaryrefslogtreecommitdiffstats
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-12-14 15:54:51 +0000
committerGravatar Sadie Powell2021-12-14 15:55:06 +0000
commit15a68932b6238cf52c3e86d1d029b0e65b8b755b (patch)
tree2f34b24a4e8d52c5a594ab6c9ff6c80a36ded469 /src/users.cpp
parentSync uniqueusername from the connect class to the user. (diff)
If a user has a unique username then include it in bans.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/users.cpp b/src/users.cpp
index fc66cf70c..38e677226 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -722,6 +722,12 @@ const std::string& User::GetIPString()
return cachedip;
}
+const std::string& User::GetBanIdent() const
+{
+ static const std::string wildcard = "*";
+ return uniqueusername ? ident : wildcard;
+}
+
const std::string& User::GetHost(bool uncloak) const
{
return uncloak ? GetRealHost() : GetDisplayedHost();