diff options
Diffstat (limited to 'include/ctables.h')
-rw-r--r-- | include/ctables.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/ctables.h b/include/ctables.h index e6ae76015..828fafd00 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -48,8 +48,11 @@ class command_t : public Extensible /** used for resource tracking between modules */ std::string source; + /** True if the command is disabled to non-opers + */ + bool disabled; - command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara) + command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara), disabled(false) { use_count = total_bytes = 0; source = "<core>"; @@ -57,6 +60,16 @@ class command_t : public Extensible virtual void Handle(const char** parameters, int pcnt, userrec* user) = 0; + void Disable(bool setting) + { + disabled = setting; + } + + bool IsDisabled() + { + return disabled; + } + virtual ~command_t() {} }; |