summaryrefslogtreecommitdiff
path: root/modules/core/ns_set.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-04 21:59:01 -0400
committerAdam <Adam@anope.org>2011-08-04 21:59:01 -0400
commit9ec18a3b020932eee6242c878149c484f49b13cb (patch)
tree6f0470e27bf4f3ced0f6833db00134f4b29a79a9 /modules/core/ns_set.cpp
parent773a1f3075fa12700d41598c0b8a8dd7caf9011e (diff)
Added a command:permission setting
Diffstat (limited to 'modules/core/ns_set.cpp')
-rw-r--r--modules/core/ns_set.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/core/ns_set.cpp b/modules/core/ns_set.cpp
index 8a419153f..ad7acb5a4 100644
--- a/modules/core/ns_set.cpp
+++ b/modules/core/ns_set.cpp
@@ -34,14 +34,17 @@ class CommandNSSet : public Command
source.Reply(" ");
source.Reply(_("Sets various nickname options. \037option\037 can be one of:"));
Anope::string this_name = source.command;
- for (command_map::iterator it = source.owner->commands.begin(), it_end = source.owner->commands.end(); it != it_end; ++it)
+ for (BotInfo::command_map::iterator it = source.owner->commands.begin(), it_end = source.owner->commands.end(); it != it_end; ++it)
{
- if (it->first.find_ci(this_name + " ") == 0)
+ const Anope::string &c_name = it->first;
+ CommandInfo &info = it->second;
+
+ if (c_name.find_ci(this_name + " ") == 0)
{
- service_reference<Command> command(it->second);
+ service_reference<Command> command(info.name);
if (command)
{
- source.command = it->first;
+ source.command = c_name;
command->OnServHelp(source);
}
}