summaryrefslogtreecommitdiff
path: root/src/core/os_session.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-11 23:43:02 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-11 23:43:02 +0000
commitd16f4930f462386a5ad5507e56c07ac6610ac2bb (patch)
tree4ce544024c3d45ac66ebdbf638b27b5aaf43741b /src/core/os_session.c
parent30b7e50a43a354e2eeeec66345b6469bd3424269 (diff)
Made Command::OnSyntaxError accept a subcommand parameter, we now give syntax error messages for subcommands (eg, cs_set) instead of giving the general syntax error for the main command
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2643 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/os_session.c')
-rw-r--r--src/core/os_session.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/os_session.c b/src/core/os_session.c
index c484f35d9..46e6bd351 100644
--- a/src/core/os_session.c
+++ b/src/core/os_session.c
@@ -77,7 +77,7 @@ class CommandOSSession : public Command
else if (cmd == "VIEW")
return this->DoView(u, params);
else
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "");
return MOD_CONT;
}
@@ -87,7 +87,7 @@ class CommandOSSession : public Command
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_OperServ, u, "SESSION", OPER_SESSION_LIST_SYNTAX);
}
@@ -208,14 +208,14 @@ class CommandOSException : public Command
if (params.size() <= last_param)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "ADD");
return MOD_CONT;
}
snprintf(reason, sizeof(reason), "%s%s%s", params[last_param].c_str(), last_param == 3 && params.size() > 4 ? " " : "", last_param == 3 && params.size() > 4 ? params[4].c_str() : "");
if (!*reason)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "ADD");
return MOD_CONT;
}
@@ -262,7 +262,7 @@ class CommandOSException : public Command
if (!mask)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "DEL");
return MOD_CONT;
}
@@ -323,7 +323,7 @@ class CommandOSException : public Command
if (!n2str)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "MOVE");
return MOD_CONT;
}
@@ -360,7 +360,7 @@ class CommandOSException : public Command
notice_lang(s_OperServ, u, READ_ONLY_MODE);
}
else
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "MOVE");
return MOD_CONT;
}
@@ -434,7 +434,7 @@ class CommandOSException : public Command
else if (cmd == "VIEW")
return this->DoView(u, params);
else
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "");
return MOD_CONT;
}
@@ -444,7 +444,7 @@ class CommandOSException : public Command
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_OperServ, u, "EXCEPTION", OPER_EXCEPTION_SYNTAX);
}