diff options
| author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-24 01:47:47 +0000 |
|---|---|---|
| committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-24 01:47:47 +0000 |
| commit | 443654f15bf036bb18f9847332e2bd03ec823b3d (patch) | |
| tree | 27e4ac8448922d1c1831563e021fc8c5d534edec /src | |
| parent | 99fe46de552058cc5aff49ab3cded4ba35bd1510 (diff) | |
Changed subcommand parameter of Command's OnHelp() from std::string to ci::string, allows sub-help (like NS SET PASSWORD) to be called without requiring the subcommand to be sent by the user in all caps.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2391 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
111 files changed, 148 insertions, 148 deletions
diff --git a/src/command.cpp b/src/command.cpp index 1718cb8a7..26b464483 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -36,7 +36,7 @@ Command::~Command() CommandReturn Command::Execute(User *u, std::vector<std::string> &) { return MOD_CONT; } -bool Command::OnHelp(User *u, const std::string &subcommand) { return false; } +bool Command::OnHelp(User *u, const ci::string &subcommand) { return false; } void Command::OnSyntaxError(User *u) { } diff --git a/src/commands.c b/src/commands.c index e9071141c..17f854a99 100644 --- a/src/commands.c +++ b/src/commands.c @@ -160,7 +160,7 @@ void mod_run_cmd(char *service, User * u, CommandHash * cmdTable[], const char * } } - // If the command requires a permission, and they aren't registered or don't have the required perm, DENIED + // If the command requires a permission, and they aren't registered or don't have the required perm, DENIED if (!c->permission.empty()) { if (!u->nc->HasPriv(c->permission) && !u->nc->HasCommand(c->permission)) @@ -195,7 +195,7 @@ void mod_help_cmd(char *service, User * u, CommandHash * cmdTable[], const char Command *c = findCommand(cmdTable, token.c_str()); - std::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining(); + ci::string subcommand = tokens.StreamEnd() ? "" : tokens.GetRemaining().c_str(); if (!c || !c->OnHelp(u, subcommand)) notice_lang(service, u, NO_HELP_AVAILABLE, cmd); diff --git a/src/core/bs_act.c b/src/core/bs_act.c index 780f08e78..21f18063b 100644 --- a/src/core/bs_act.c +++ b/src/core/bs_act.c @@ -50,7 +50,7 @@ class CommandBSAct : public Command { params[1].erase(i, 1); } - + ircdproto->SendAction(ci->bi, ci->name, "%s", params[1].c_str()); ci->bi->lastmsg = time(NULL); if (LogBot && LogChannel && logchan && !debug && findchan(LogChannel)) @@ -63,7 +63,7 @@ class CommandBSAct : public Command syntax_error(s_BotServ, u, "ACT", BOT_ACT_SYNTAX); } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_ACT); return true; diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c index aa8d30b9f..20c5e3bb4 100644 --- a/src/core/bs_assign.c +++ b/src/core/bs_assign.c @@ -66,7 +66,7 @@ class CommandBSAssign : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_ASSIGN); return true; diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c index 190f5b510..bc22c0312 100644 --- a/src/core/bs_badwords.c +++ b/src/core/bs_badwords.c @@ -285,7 +285,7 @@ class CommandBSBadwords : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_BADWORDS); return true; diff --git a/src/core/bs_bot.c b/src/core/bs_bot.c index 96f72c336..787f5b131 100644 --- a/src/core/bs_bot.c +++ b/src/core/bs_bot.c @@ -425,7 +425,7 @@ class CommandBSBot : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_lang(s_BotServ, u, BOT_SERVADMIN_HELP_BOT); return true; diff --git a/src/core/bs_botlist.c b/src/core/bs_botlist.c index e363c8545..5064642f6 100644 --- a/src/core/bs_botlist.c +++ b/src/core/bs_botlist.c @@ -63,7 +63,7 @@ class CommandBSBotList : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_BOTLIST); return true; diff --git a/src/core/bs_info.c b/src/core/bs_info.c index e43f264c9..cad350cb2 100644 --- a/src/core/bs_info.c +++ b/src/core/bs_info.c @@ -236,7 +236,7 @@ class CommandBSInfo : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_INFO); return true; diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c index 7b6b153bf..372a4ef7f 100644 --- a/src/core/bs_kick.c +++ b/src/core/bs_kick.c @@ -308,7 +308,7 @@ class CommandBSKick : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { if (subcommand.empty()) notice_help(s_BotServ, u, BOT_HELP_KICK); diff --git a/src/core/bs_say.c b/src/core/bs_say.c index 5f9c766bf..6fd8f41c7 100644 --- a/src/core/bs_say.c +++ b/src/core/bs_say.c @@ -63,7 +63,7 @@ class CommandBSSay : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_SAY); return true; diff --git a/src/core/bs_set.c b/src/core/bs_set.c index 6e9458fb4..c68a11688 100644 --- a/src/core/bs_set.c +++ b/src/core/bs_set.c @@ -145,7 +145,7 @@ class CommandBSSet : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { if (subcommand.empty()) { diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c index 52b28a078..83771fc9d 100644 --- a/src/core/bs_unassign.c +++ b/src/core/bs_unassign.c @@ -42,7 +42,7 @@ class CommandBSUnassign : public Command return MOD_CONT; } - bool OnHelp(User *u, const std::string &subcommand) + bool OnHelp(User *u, const ci::string &subcommand) { notice_help(s_BotServ, u, BOT_HELP_UNASSIG |
