diff options
author | Adam <Adam@anope.org> | 2013-05-17 22:53:55 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-05-17 22:53:55 -0400 |
commit | cc4a14b0badfe3d617ec2dd230d7921f8650a069 (patch) | |
tree | 73ded53114ee7b100c548bdb448a6cc36b392da8 /modules/commands/cs_xop.cpp | |
parent | 934b5843744e586ce9a3c7725a19c7ddffe14ee8 (diff) |
Removed some hard coded command names in help output
Diffstat (limited to 'modules/commands/cs_xop.cpp')
-rw-r--r-- | modules/commands/cs_xop.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 9efde866c..192eb4529 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -524,12 +524,21 @@ class CommandCSXOP : public Command "(unless SECUREOPS is off). However, any user on the\n" "VOP list or above may use the \002%s LIST\002 command.\n" " \n"), cmd.c_str(), cmd.c_str()); - source.Reply(_("Alternative methods of modifying channel access lists are\n" - "available. See \002%s%s HELP ACCESS\002 for information\n" - "about the access list, and \002%s%s HELP FLAGS\002 for\n" - "information about the flags based system."), - Config->StrictPrivmsg.c_str(), source.service->nick.c_str(), - Config->StrictPrivmsg.c_str(), source.service->nick.c_str()); + BotInfo *access_bi, *flags_bi; + Anope::string access_cmd, flags_cmd; + Command::FindCommandFromService("chanserv/access", access_bi, access_cmd); + Command::FindCommandFromService("chanserv/flags", flags_bi, access_cmd); + if (!access_cmd.empty() || !flags_cmd.empty()) + { + source.Reply(_("Alternative methods of modifying channel access lists are\n" + "available. ")); + if (!access_cmd.empty()) + source.Reply(_("See \002%s%s HELP %s\002 for more information\n" + "about the access list."), Config->StrictPrivmsg.c_str(), access_bi->nick.c_str(), access_cmd.c_str()); + if (!flags_cmd.empty()) + source.Reply(_("See \002%s%s HELP %s\002 for more information\n" + "about the flags system."), Config->StrictPrivmsg.c_str(), flags_bi->nick.c_str(), flags_cmd.c_str()); + } return true; } }; |