summaryrefslogtreecommitdiff
path: root/src/core/cs_xop.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/cs_xop.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/cs_xop.c')
-rw-r--r--src/core/cs_xop.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c
index 8dfbf8a85..81dd80224 100644
--- a/src/core/cs_xop.c
+++ b/src/core/cs_xop.c
@@ -126,7 +126,7 @@ class XOPBase : public Command
if (!nick)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "ADD");
return MOD_CONT;
}
@@ -214,7 +214,7 @@ class XOPBase : public Command
if (!nick)
{
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "DEL");
return MOD_CONT;
}
@@ -391,7 +391,7 @@ class XOPBase : public Command
else if (cmd == "CLEAR")
return this->DoClear(u, params, ci, level, messages);
else
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "");
return MOD_CONT;
}
public:
@@ -407,7 +407,7 @@ class XOPBase : public Command
virtual bool OnHelp(User *u, const ci::string &subcommand) = 0;
- virtual void OnSyntaxError(User *u) = 0;
+ virtual void OnSyntaxError(User *u, const ci::string &subcommand) = 0;
};
class CommandCSQOP : public XOPBase
@@ -428,7 +428,7 @@ class CommandCSQOP : public XOPBase
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "QOP", CHAN_QOP_SYNTAX);
}
@@ -452,7 +452,7 @@ class CommandCSAOP : public XOPBase
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "AOP", CHAN_AOP_SYNTAX);
}
@@ -476,7 +476,7 @@ class CommandCSHOP : public XOPBase
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "HOP", CHAN_HOP_SYNTAX);
}
@@ -500,7 +500,7 @@ class CommandCSSOP : public XOPBase
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "SOP", CHAN_SOP_SYNTAX);
}
@@ -524,7 +524,7 @@ class CommandCSVOP : public XOPBase
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "VOP", CHAN_VOP_SYNTAX);
}