summaryrefslogtreecommitdiff
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:58:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-13 19:58:28 +0000
commit468144eb0b823833b09717ad954530ee3b60cbc0 (patch)
treec9609d378ef52a5858563c7e1da3cc7e37bd58e3 /src/command_parse.cpp
parent48103a05e75dc208bcd01b62b19ae01158c01b50 (diff)
More conversion, and a note to client coders.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10011 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r--src/command_parse.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/command_parse.cpp b/src/command_parse.cpp
index 5b8b5b7f9..00e5402fa 100644
--- a/src/command_parse.cpp
+++ b/src/command_parse.cpp
@@ -291,7 +291,7 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
{
if (user->registered == REG_ALL)
{
- user->WriteNumeric(421, "%s %s :Unknown command",user->nick.c_str(),command.c_str());
+ user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :Unknown command",user->nick.c_str(),command.c_str());
}
ServerInstance->stats->statsUnknown++;
return true;
@@ -315,33 +315,33 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
{
if (!user->IsModeSet(cm->second->flags_needed))
{
- user->WriteNumeric(481, "%s :Permission Denied - You do not have the required operator privileges",user->nick.c_str());
+ user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Permission Denied - You do not have the required operator privileges",user->nick.c_str());
return do_more;
}
if (!user->HasPermission(command))
{
- user->WriteNumeric(481, "%s :Permission Denied - Oper type %s does not have access to command %s",user->nick.c_str(),user->oper.c_str(),command.c_str());
+ user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Permission Denied - Oper type %s does not have access to command %s",user->nick.c_str(),user->oper.c_str(),command.c_str());
return do_more;
}
}
if ((user->registered == REG_ALL) && (!IS_OPER(user)) && (cm->second->IsDisabled()))
{
/* command is disabled! */
- user->WriteNumeric(421, "%s %s :This command has been disabled.",user->nick.c_str(),command.c_str());
+ user->WriteNumeric(ERR_UNKNOWNCOMMAND, "%s %s :This command has been disabled.",user->nick.c_str(),command.c_str());
ServerInstance->SNO->WriteToSnoMask('d', "%s denied for %s (%s@%s)",
command.c_str(), user->nick.c_str(), user->ident.c_str(), user->host.c_str());
return do_more;
}
if (command_p.size() < cm->second->min_params)
{
- user->WriteNumeric(461, "%s %s :Not enough parameters.", user->nick.c_str(), command.c_str());
+ user->WriteNumeric(ERR_NEEDMOREPARAMS, "%s %s :Not enough parameters.", user->nick.c_str(), command.c_str());
if ((ServerInstance->Config->SyntaxHints) && (user->registered == REG_ALL) && (cm->second->syntax.length()))
user->WriteNumeric(304, "%s :SYNTAX %s %s", user->nick.c_str(), cm->second->command.c_str(), cm->second->syntax.c_str());
return do_more;
}
if ((user->registered != REG_ALL) && (!cm->second->WorksBeforeReg()))
{
- user->WriteNumeric(451, "%s :You have not registered",command.c_str());
+ user->WriteNumeric(ERR_NOTREGISTERED, "%s :You have not registered",command.c_str());
return do_more;
}
else