summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h21
1 files changed, 2 insertions, 19 deletions
diff --git a/include/modules.h b/include/modules.h
index bd128a3bc..d5fddcc44 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -217,7 +217,7 @@ struct ModuleLang_ {
char **argv;
};
-enum CommandFlags
+enum CommandFlag
{
CFLAG_ALLOW_UNREGISTERED = 1,
CFLAG_ALLOW_FORBIDDEN = 2,
@@ -229,9 +229,8 @@ enum CommandFlags
/** Every services command is a class, inheriting from Command.
*/
-class CoreExport Command
+class CoreExport Command : public Flags<CommandFlag>
{
- int flags;
public:
size_t MaxParams;
size_t MinParams;
@@ -264,22 +263,6 @@ class CoreExport Command
*/
virtual void OnSyntaxError(User *u);
- /** Set a certain flag on this command.
- * @param flag The CommandFlag to set on this command.
- */
- void SetFlag(CommandFlags flag);
-
- /** Remove a certain flag from this command.
- * @param flag The CommandFlag to unset.
- */
- void UnsetFlag(CommandFlags flag);
-
- /** Check whether a certain flag is set on this command.
- * @param flag The CommandFlag to check.
- * @return bool True if the flag is set, false else.
- */
- bool HasFlag(CommandFlags flag) const;
-
/** Set which command permission (e.g. chanserv/forbid) is required for this command.
* @param reststr The permission required to successfully execute this command
*/