diff options
author | Adam <Adam@anope.org> | 2017-02-06 14:23:18 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2017-02-06 14:23:18 -0500 |
commit | 8b694bc392c36551e428b84454efb81cdbc8bcd3 (patch) | |
tree | ca3d1ca8aadac280c149518134de4208f91dad84 /include/commands.h | |
parent | 9ad06f49bbb3824139b0c0ee0a74898a18c8f735 (diff) |
Track override in CommandSource and use it in the logger
Diffstat (limited to 'include/commands.h')
-rw-r--r-- | include/commands.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/commands.h b/include/commands.h index d3aa180a2..1dddfa4fd 100644 --- a/include/commands.h +++ b/include/commands.h @@ -67,6 +67,8 @@ class CoreExport CommandSource Reference<User> u; /* Command info being executed */ CommandInfo command; + /* whether or not this is an override as determined by the command */ + bool override = false; public: /* The account executing the command */ Reference<NickServ::Account> nc; @@ -108,6 +110,10 @@ class CoreExport CommandSource bool HasPriv(const Anope::string &cmd); bool IsServicesOper(); bool IsOper(); + + bool HasOverridePriv(const Anope::string &priv); + bool HasOverrideCommand(const Anope::string &priv); + bool IsOverride() const; }; /** Every services command is a class, inheriting from Command. @@ -143,8 +149,6 @@ class CoreExport Command : public Service */ Command(Module *owner, const Anope::string &sname, size_t min_params, size_t max_params = 0); - virtual ~Command(); - void SetDesc(const Anope::string &d); void ClearSyntax(); |