aboutsummaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-10-29 13:30:39 +0100
committerGravatar Sadie Powell2022-10-29 13:43:11 +0100
commit5a508c19ff3dec65bb4148883d38127d7c0be79e (patch)
tree2bdfcbadfdfbe0a6fd244260a9570be86a3eb8d4 /src/command_parse.cpp
parentAllow UserManager::Find{Nick,UUID,} to ignore unregistered users. (diff)
Use User::IsFullyConnected instead of checking for REG_ALL.
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 028378eb4..dda2d2edd 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -211,7 +211,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
handler = GetHandler(command);
if (!handler)
{
- if (user->registered == REG_ALL)
+ if (user->IsFullyConnected())
user->WriteNumeric(ERR_UNKNOWNCOMMAND, command, "Unknown command");
ServerInstance->stats.Unknown++;
@@ -290,7 +290,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
case CmdAccess::SERVER:
{
- if (user->registered == REG_ALL)
+ if (user->IsFullyConnected())
user->WriteNumeric(ERR_UNKNOWNCOMMAND, command, "Unknown command");
ServerInstance->stats.Unknown++;
@@ -311,7 +311,7 @@ void CommandParser::ProcessCommand(LocalUser* user, std::string& command, Comman
return;
}
- if ((user->registered != REG_ALL) && (!handler->works_before_reg))
+ if (!user->IsFullyConnected() && !handler->works_before_reg)
{
user->CommandFloodPenalty += failpenalty;
handler->TellNotRegistered(user, command_p);