From ce09914e1d767e88f6f5d72ac622d1321c91f9ee Mon Sep 17 00:00:00 2001 From: cyberbotx Date: Mon, 23 Mar 2009 04:29:25 +0000 Subject: Fix part #2 of bug #1010, patched partially by Adam and cleaned up / finished by me, the help commands should work as expected now, including "help set ..." and similar help entries. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2194 5417fbe8-f217-4b02-8779-1006273d7864 --- src/core/bs_set.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/core/bs_set.c') diff --git a/src/core/bs_set.c b/src/core/bs_set.c index b03b622b1..d8bf4c03b 100644 --- a/src/core/bs_set.c +++ b/src/core/bs_set.c @@ -150,7 +150,13 @@ class CommandBSSet : public Command bool OnHelp(User *u, const std::string &subcommand) { - if (subcommand == "DONTKICKOPS") + if (subcommand.empty()) + { + notice_help(s_BotServ, u, BOT_HELP_SET); + if (is_services_admin(u)) + notice_help(s_BotServ, u, BOT_SERVADMIN_HELP_SET); + } + else if (subcommand == "DONTKICKOPS") notice_help(s_BotServ, u, BOT_HELP_SET_DONTKICKOPS); else if (subcommand == "DONTKICKVOICES") notice_help(s_BotServ, u, BOT_HELP_SET_DONTKICKVOICES); @@ -164,12 +170,8 @@ class CommandBSSet : public Command notice_lang(s_BotServ, u, BOT_SERVADMIN_HELP_SET_NOBOT); else if (subcommand == "PRIVATE") notice_lang(s_BotServ, u, BOT_SERVADMIN_HELP_SET_PRIVATE); - else if (subcommand.empty()) - { - notice_help(s_BotServ, u, BOT_HELP_SET); - if (is_services_admin(u) || is_services_root(u)) - notice_help(s_BotServ, u, BOT_SERVADMIN_HELP_SET); - } + else + return false; return true; } -- cgit