summaryrefslogtreecommitdiff
path: root/modules/core/ns_set.cpp
diff options
context:
space:
mode:
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);
}
}