From 6d06ed1a9e25683755b215ed1c89fde2fadbd797 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 28 Jul 2006 17:13:38 +0000 Subject: Tidyup git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4580 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') 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)) -- cgit v1.2.3