summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 788afcf3e..d82f523db 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -290,10 +290,13 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
/* find the command, check it exists */
Commandable::iterator cm = cmdlist.find(command);
- if (cm == cmdlist.end() && user->registered == REG_ALL)
+ if (cm == cmdlist.end())
{
+ if (user->registered == REG_ALL)
+ {
+ user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
+ }
ServerInstance->stats->statsUnknown++;
- user->WriteServ("421 %s %s :Unknown command",user->nick,command.c_str());
return true;
}