From 28cfa7d8aec7a122f51b36a715fd6ddc55837be1 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 28 Jul 2006 16:54:42 +0000 Subject: Document and Change syntaxhints to seperate RPL_TEXT (prefix SYNTAX) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4578 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 7 ++++++- src/configreader.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index a90b7e4e3..3f8e87989 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -252,7 +252,12 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd) { /* If syntax is given, display this as the 461 reply */ if (cm->second->syntax.length()) - WriteServ(user->fd,"461 %s %s :Not enough parameters. Syntax: %s %s", user->nick, command.c_str(), cm->second->command.c_str(), cm->second->syntax.c_str()); + { + 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()); return; diff --git a/src/configreader.cpp b/src/configreader.cpp index b5ea8a815..d776027e7 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -568,6 +568,7 @@ void ServerConfig::Read(bool bail, userrec* user) {"options", "operspywhois", &this->OperSpyWhois, DT_BOOLEAN, NoValidation}, {"options", "tempdir", &this->TempDir, DT_CHARPTR, ValidateTempDir}, {"options", "nouserdns", &this->NoUserDns, DT_BOOLEAN, NoValidation}, + {"options", "syntaxhints", &this->SyntaxHints, DT_BOOLEAN, NoValidation}, {"pid", "file", &this->PID, DT_CHARPTR, NoValidation}, {NULL} }; -- cgit v1.2.3