summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/command_parse.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 157162bce..10fe6e1ee 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -250,16 +250,10 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
}
if (items < cm->second->min_params)
{
+ WriteServ(user->fd,"461 %s %s :Not enough parameters.", user->nick, command.c_str());
/* If syntax is given, display this as the 461 reply */
- if (cm->second->syntax.length())
- {
- WriteServ(user->fd,"461 %s %s :Not enough parameters.", user->nick, command.c_str());
- /* Use RPL_TEXT for this */
- if (Config->SyntaxHints)
- WriteServ(user->fd,"304 %s :SYNTAX %s %s", user->nick, cm->second->command.c_str(), cm->second->syntax.c_str());
- }
- else
- WriteServ(user->fd,"461 %s %s :Not enough parameters", user->nick, command.c_str());
+ if ((Config->SyntaxHints) && (cm->second->syntax.length()))
+ WriteServ(user->fd,"304 %s :SYNTAX %s %s", user->nick, cm->second->command.c_str(), cm->second->syntax.c_str());
return;
}
if ((user->registered == REG_ALL) || (cm->second == command_user) || (cm->second == command_nick) || (cm->second == command_pass))