aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-14 17:13:47 +0000
committerGravatar Sadie Powell2025-03-14 17:21:13 +0000
commitf47bbd3f2587da85a94e81da6481545174ffb588 (patch)
tree13be3e0eaf73d31be070faa5015cfc6dc7eab3f6 /modules
parentAdd support for usernames in the cloaking system. (diff)
Fix an inverted statement in the cloak module.
Diffstat (limited to 'modules')
-rw-r--r--modules/cloak.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/cloak.cpp b/modules/cloak.cpp
index 2c36b0bd7..476f0984a 100644
--- a/modules/cloak.cpp
+++ b/modules/cloak.cpp
@@ -190,7 +190,7 @@ public:
for (const auto& cloakmethod : cloakmethods)
{
const auto cloak = cloakmethod->Cloak(user);
- if (!cloak)
+ if (cloak)
{
cloaks->push_back(*cloak);
@@ -335,7 +335,7 @@ public:
{
// We were able to generate cloaks for this user.
auto &cloak = cloaks->front();
- if (cloak.username.empty())
+ if (!cloak.username.empty())
user->ChangeDisplayedUser(cloak.username);
user->ChangeDisplayedHost(cloak.hostname);
user->SetMode(this, true);
@@ -465,7 +465,7 @@ public:
{
// The user has a new cloak list; pick the first.
auto &cloak = cloaks->front();
- if (cloak.username.empty())
+ if (!cloak.username.empty())
user->ChangeDisplayedUser(cloak.username);
user->ChangeDisplayedHost(cloak.hostname);
}