From d16f4930f462386a5ad5507e56c07ac6610ac2bb Mon Sep 17 00:00:00 2001 From: Adam- Date: Wed, 11 Nov 2009 23:43:02 +0000 Subject: 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 --- src/modules/os_info.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/modules/os_info.c') diff --git a/src/modules/os_info.c b/src/modules/os_info.c index 6298a7744..a56aa724f 100644 --- a/src/modules/os_info.c +++ b/src/modules/os_info.c @@ -61,7 +61,7 @@ class CommandNSOInfo : public Command if (!info) { - this->OnSyntaxError(u); + this->OnSyntaxError(u, "ADD"); return MOD_CONT; } @@ -119,7 +119,8 @@ class CommandNSOInfo : public Command else if (cmd == "DEL") return this->DoDel(u, params); else - this->OnSyntaxError(u); + this->OnSyntaxError(u, ""); + return MOD_CONT; } @@ -129,7 +130,7 @@ class CommandNSOInfo : public Command return true; } - void OnSyntaxError(User *u) + void OnSyntaxError(User *u, const ci::string &subcommand) { me->NoticeLang(s_NickServ, u, OINFO_SYNTAX); } @@ -147,7 +148,7 @@ class CommandCSOInfo : public Command if (!info) { - this->OnSyntaxError(u); + this->OnSyntaxError(u, "ADD"); return MOD_CONT; } @@ -193,7 +194,7 @@ class CommandCSOInfo : public Command else if (cmd == "DEL") return this->DoDel(u, params); else - this->OnSyntaxError(u); + this->OnSyntaxError(u, ""); return MOD_CONT; } @@ -203,7 +204,7 @@ class CommandCSOInfo : public Command return true; } - void OnSyntaxError(User *u) + void OnSyntaxError(User *u, const ci::string &subcommand) { me->NoticeLang(s_ChanServ, u, OCINFO_SYNTAX); } -- cgit