summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h2
-rw-r--r--include/ctables.h15
2 files changed, 16 insertions, 1 deletions
diff --git a/include/configreader.h b/include/configreader.h
index b37838cf1..c6775bc29 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -394,4 +394,6 @@ class ServerConfig : public Extensible
bool DelIOHook(int port);
};
+bool InitializeDisabledCommands(const char* data, InspIRCd* ServerInstance);
+
#endif
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() {}
};