1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 04:23:14 +02:00

Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums

This commit is contained in:
Adam
2013-01-21 22:31:16 -05:00
parent 51c049e1a7
commit ddaa001daf
128 changed files with 1857 additions and 2293 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ class CommandHelp : public Command
CommandHelp(Module *creator) : Command(creator, "generic/help", 0)
{
this->SetDesc(_("Displays this list and give information about commands"));
this->SetFlag(CFLAG_ALLOW_UNREGISTERED);
this->AllowUnregistered(true);
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
@@ -75,7 +75,7 @@ class CommandHelp : public Command
continue;
else if (!Config->HidePrivilegedCommands)
; // Always show with HidePrivilegedCommands disabled
else if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !source.GetAccount())
else if (!c->AllowUnregistered() && !source.GetAccount())
continue;
else if (!info.permission.empty() && !source.HasCommand(info.permission))
continue;
@@ -166,7 +166,7 @@ class CommandHelp : public Command
source.Reply(" ");
source.Reply(_("Access to this command requires the permission \002%s\002 to be present in your opertype."), info.permission.c_str());
}
if (!c->HasFlag(CFLAG_ALLOW_UNREGISTERED) && !source.nc)
if (!c->AllowUnregistered() && !source.nc)
{
if (info.permission.empty())
source.Reply(" ");