diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-02-27 10:16:05 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-02-27 10:19:44 +0000 |
| commit | 7640fad30cc2a3d61e67a7075c27f26400d4779f (patch) | |
| tree | f313f0e7cf6fafd1c94f7bd2b3650a207f941ccc /modules/nickserv | |
| parent | 9f6d3787559febb48611b1477eaa6a35beadf71a (diff) | |
Simplify several boolean expressions.
Diffstat (limited to 'modules/nickserv')
| -rw-r--r-- | modules/nickserv/ns_ajoin.cpp | 6 | ||||
| -rw-r--r-- | modules/nickserv/ns_group.cpp | 2 | ||||
| -rw-r--r-- | modules/nickserv/ns_recover.cpp | 2 | ||||
| -rw-r--r-- | modules/nickserv/ns_register.cpp | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/modules/nickserv/ns_ajoin.cpp b/modules/nickserv/ns_ajoin.cpp index 19355f861..a21f66fd0 100644 --- a/modules/nickserv/ns_ajoin.cpp +++ b/modules/nickserv/ns_ajoin.cpp @@ -146,7 +146,7 @@ class CommandNSAJoin final } else if (i != (*channels)->size()) alreadyadded += chan + ", "; - else if (IRCD->IsChannelValid(chan) == false) + else if (!IRCD->IsChannelValid(chan)) source.Reply(CHAN_X_INVALID, chan.c_str()); else { @@ -361,9 +361,9 @@ public: continue; else if (c->HasMode("SSL") && !u->IsSecurelyConnected()) continue; - else if (c->MatchesList(u, "BAN") == true && c->MatchesList(u, "EXCEPT") == false) + else if (c->MatchesList(u, "BAN") && !c->MatchesList(u, "EXCEPT")) need_invite = true; - else if (c->HasMode("INVITE") && c->MatchesList(u, "INVITEOVERRIDE") == false) + else if (c->HasMode("INVITE") && !c->MatchesList(u, "INVITEOVERRIDE")) need_invite = true; if (c->HasMode("KEY")) diff --git a/modules/nickserv/ns_group.cpp b/modules/nickserv/ns_group.cpp index 3afec1061..58ded41b4 100644 --- a/modules/nickserv/ns_group.cpp +++ b/modules/nickserv/ns_group.cpp @@ -178,7 +178,7 @@ public: if (user != NULL && !user->fingerprint.empty() && cl && cl->FindCert(user->fingerprint)) ok = true; - if (ok == false && !pass.empty()) + if (!ok && !pass.empty()) { auto *req = new NSGroupRequest(owner, source, this, source.GetNick(), target, pass); FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req)); diff --git a/modules/nickserv/ns_recover.cpp b/modules/nickserv/ns_recover.cpp index 7460dbd33..f12929f3a 100644 --- a/modules/nickserv/ns_recover.cpp +++ b/modules/nickserv/ns_recover.cpp @@ -192,7 +192,7 @@ public: if (source.HasPriv("nickserv/recover")) ok = true; - if (ok == false && !pass.empty()) + if (!ok && !pass.empty()) { auto *req = new NSRecoverRequest(owner, source, this, na->nick, pass); FOREACH_MOD(OnCheckAuthentication, (source.GetUser(), req)); diff --git a/modules/nickserv/ns_register.cpp b/modules/nickserv/ns_register.cpp index 5ee5fccb2..34a76d973 100644 --- a/modules/nickserv/ns_register.cpp +++ b/modules/nickserv/ns_register.cpp @@ -35,7 +35,7 @@ public: NickAlias *na = NickAlias::Find(nick); if (na == NULL) source.Reply(NICK_X_NOT_REGISTERED, nick.c_str()); - else if (na->nc->HasExt("UNCONFIRMED") == false) + else if (!na->nc->HasExt("UNCONFIRMED")) source.Reply(_("Nick \002%s\002 is already confirmed."), na->nick.c_str()); else { |
