mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
Document <options:syntaxhints> and <options:nouserdns>
Change syntaxhints to seperate RPL_TEXT (prefix SYNTAX) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4578 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
1448d13e17
commit
28cfa7d8ae
@ -564,6 +564,16 @@
|
|||||||
# temporarily copied before loading. If not defined, #
|
# temporarily copied before loading. If not defined, #
|
||||||
# defaults to /tmp. #
|
# defaults to /tmp. #
|
||||||
# #
|
# #
|
||||||
|
# nouserdns - If set to 'yes', 'true' or '1', no user dns #
|
||||||
|
# lookups will be performed for connecting users. #
|
||||||
|
# this can save a lot of resources on very busy irc #
|
||||||
|
# servers. #
|
||||||
|
# #
|
||||||
|
# syntaxhints - If et to 'yes', 'true' or '1', when a user does #
|
||||||
|
# not give enough parameters for a command, a syntax #
|
||||||
|
# hint will be given (using the RPL_TEXT numeric) #
|
||||||
|
# as well as the standard ERR_NEEDMOREPARAMS. #
|
||||||
|
# #
|
||||||
|
|
||||||
<options prefixquit="Quit: "
|
<options prefixquit="Quit: "
|
||||||
loglevel="default"
|
loglevel="default"
|
||||||
@ -581,6 +591,8 @@
|
|||||||
hidewhois=""
|
hidewhois=""
|
||||||
flatlinks="no"
|
flatlinks="no"
|
||||||
hideulines="no"
|
hideulines="no"
|
||||||
|
nouserdns="no"
|
||||||
|
syntaxhints="no"
|
||||||
allowhalfop="yes">
|
allowhalfop="yes">
|
||||||
|
|
||||||
|
|
||||||
|
@ -348,6 +348,10 @@ class ServerConfig : public Extensible
|
|||||||
*/
|
*/
|
||||||
bool NoUserDns;
|
bool NoUserDns;
|
||||||
|
|
||||||
|
/** If set to true, provide syntax hints for unknown commands
|
||||||
|
*/
|
||||||
|
bool SyntaxHints;
|
||||||
|
|
||||||
ServerConfig();
|
ServerConfig();
|
||||||
|
|
||||||
/** Clears the include stack in preperation for
|
/** Clears the include stack in preperation for
|
||||||
|
@ -252,7 +252,12 @@ void CommandParser::ProcessCommand(userrec *user, std::string &cmd)
|
|||||||
{
|
{
|
||||||
/* If syntax is given, display this as the 461 reply */
|
/* If syntax is given, display this as the 461 reply */
|
||||||
if (cm->second->syntax.length())
|
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
|
else
|
||||||
WriteServ(user->fd,"461 %s %s :Not enough parameters", user->nick, command.c_str());
|
WriteServ(user->fd,"461 %s %s :Not enough parameters", user->nick, command.c_str());
|
||||||
return;
|
return;
|
||||||
|
@ -568,6 +568,7 @@ void ServerConfig::Read(bool bail, userrec* user)
|
|||||||
{"options", "operspywhois", &this->OperSpyWhois, DT_BOOLEAN, NoValidation},
|
{"options", "operspywhois", &this->OperSpyWhois, DT_BOOLEAN, NoValidation},
|
||||||
{"options", "tempdir", &this->TempDir, DT_CHARPTR, ValidateTempDir},
|
{"options", "tempdir", &this->TempDir, DT_CHARPTR, ValidateTempDir},
|
||||||
{"options", "nouserdns", &this->NoUserDns, DT_BOOLEAN, NoValidation},
|
{"options", "nouserdns", &this->NoUserDns, DT_BOOLEAN, NoValidation},
|
||||||
|
{"options", "syntaxhints", &this->SyntaxHints, DT_BOOLEAN, NoValidation},
|
||||||
{"pid", "file", &this->PID, DT_CHARPTR, NoValidation},
|
{"pid", "file", &this->PID, DT_CHARPTR, NoValidation},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user