summaryrefslogtreecommitdiff
path: root/modules/core/ns_saset.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_saset.cpp
parent773a1f3075fa12700d41598c0b8a8dd7caf9011e (diff)
Added a command:permission setting
Diffstat (limited to 'modules/core/ns_saset.cpp')
-rw-r--r--modules/core/ns_saset.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/core/ns_saset.cpp b/modules/core/ns_saset.cpp
index b3f732176..a4aa2f422 100644
--- a/modules/core/ns_saset.cpp
+++ b/modules/core/ns_saset.cpp
@@ -33,14 +33,17 @@ class CommandNSSASet : public Command
this->SendSyntax(source);
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);
}
}
@@ -55,7 +58,7 @@ class CommandNSSASet : public Command
class CommandNSSASetDisplay : public Command
{
public:
- CommandNSSASetDisplay(Module *creator) : Command(creator, "nickserv/saset/display", 2, 2, "nickserv/saset/display")
+ CommandNSSASetDisplay(Module *creator) : Command(creator, "nickserv/saset/display", 2, 2)
{
this->SetDesc(_("Set the display of the group in Services"));
this->SetSyntax(_("\037nickname\037 \037new-display\037"));
@@ -95,7 +98,7 @@ class CommandNSSASetDisplay : public Command
class CommandNSSASetPassword : public Command
{
public:
- CommandNSSASetPassword(Module *creator) : Command(creator, "nickserv/saset/password", 2, 2, "nickserv/saset/password")
+ CommandNSSASetPassword(Module *creator) : Command(creator, "nickserv/saset/password", 2, 2)
{
this->SetDesc(_("Set the nickname password"));
this->SetSyntax(_("\037nickname\037 \037new-password\037"));