summaryrefslogtreecommitdiff
path: root/src/core/cs_akick.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_akick.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_akick.c')
-rw-r--r--src/core/cs_akick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c
index c0f3fc12c..8d2faffa5 100644
--- a/src/core/cs_akick.c
+++ b/src/core/cs_akick.c
@@ -534,7 +534,7 @@ class CommandCSAKick : public Command
ChannelInfo *ci = cs_findchan(chan.c_str());
if (mask.empty() && (cmd == "ADD" || cmd == "STICK" || cmd == "UNSTICK" || cmd == "DEL"))
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, cmd);
else if (!check_access(u, ci, CA_AKICK) && !u->nc->HasPriv("chanserv/access/modify"))
notice_lang(s_ChanServ, u, ACCESS_DENIED);
else if (cmd != "LIST" && cmd != "VIEW" && cmd != "ENFORCE" && readonly)
@@ -556,7 +556,7 @@ class CommandCSAKick : public Command
else if (cmd == "CLEAR")
this->DoClear(u, ci, params);
else
- this->OnSyntaxError(u);
+ this->OnSyntaxError(u, "");
return MOD_CONT;
}
@@ -567,7 +567,7 @@ class CommandCSAKick : public Command
return true;
}
- void OnSyntaxError(User *u)
+ void OnSyntaxError(User *u, const ci::string &subcommand)
{
syntax_error(s_ChanServ, u, "AKICK", CHAN_AKICK_SYNTAX);
}