diff options
| author | 2022-10-16 22:15:31 +0100 | |
|---|---|---|
| committer | 2022-10-16 22:15:31 +0100 | |
| commit | 65fe0fc67defc6c883537c7aeab87cd7b97da770 (patch) | |
| tree | 978984f22a2812a946363ee0809f6041861a58e0 /src/modules | |
| parent | Refactor the DNS resolvers in the spanningtree module. (diff) | |
| download | inspircd++-65fe0fc67defc6c883537c7aeab87cd7b97da770.tar.gz inspircd++-65fe0fc67defc6c883537c7aeab87cd7b97da770.tar.bz2 inspircd++-65fe0fc67defc6c883537c7aeab87cd7b97da770.zip | |
Remove is_registered in services_account.
The account can never be an empty string so this check is useless.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/m_services_account.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 86e39be23..f9e36d556 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -276,15 +276,13 @@ public: const std::string* account = accountapi.GetAccountName(user); - bool is_registered = account && !account->empty(); - switch (target.type) { case MessageTarget::TYPE_CHANNEL: { Channel* targetchan = target.Get<Channel>(); - if (!targetchan->IsModeSet(regmoderatedmode) || is_registered) + if (!targetchan->IsModeSet(regmoderatedmode) || account) return MOD_RES_PASSTHRU; if (CheckExemption::Call(exemptionprov, user, targetchan, "regmoderated") == MOD_RES_ALLOW) @@ -297,7 +295,7 @@ public: case MessageTarget::TYPE_USER: { User* targetuser = target.Get<User>(); - if (!targetuser->IsModeSet(regdeafmode) || is_registered) + if (!targetuser->IsModeSet(regdeafmode) || account) return MOD_RES_PASSTHRU; if (calleridapi && calleridapi->IsOnAcceptList(user, targetuser)) @@ -330,13 +328,11 @@ public: const std::string* account = accountapi.GetAccountName(user); - bool is_registered = account && !account->empty(); - if (chan) { if (chan->IsModeSet(reginvitemode)) { - if (!is_registered) + if (!account) { // joining a +R channel and not identified user->WriteNumeric(ERR_NEEDREGGEDNICK, chan->name, "You need to be identified to a registered account to join this channel"); |
