mirror of
https://github.com/anope/anope.git
synced 2026-07-08 04:43:13 +02:00
Added a command:permission setting
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
class CommandCSSASet : public Command
|
||||
{
|
||||
public:
|
||||
CommandCSSASet(Module *creator) : Command(creator, "chanserv/saset", 2, 3, "chanserv/saset")
|
||||
CommandCSSASet(Module *creator) : Command(creator, "chanserv/saset", 2, 3)
|
||||
{
|
||||
this->SetDesc(_("Forcefully set channel options and information"));
|
||||
this->SetSyntax(_("\037option\037 \037channel\037 \037parameters\037"));
|
||||
@@ -37,11 +37,13 @@ class CommandCSSASet : public Command
|
||||
" \n"
|
||||
"Available options:"));
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user