diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-08 20:06:21 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-11-08 20:06:21 +0000 |
commit | 458be36a321615c0f3004a6abde7e14d40f5da32 (patch) | |
tree | 711be83fc6f2d49f9d31015db51730cdac57f687 /include/modules.h | |
parent | 38ad96c57c520dd84c8de21766f5de082a844a99 (diff) |
Rewrote all of the old C style flag systems into a new Flag class which everything inherits from. This breaks reading and writing flags to the old databases (and probably many other things aswell) - Don't use it
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2636 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 21 |
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 */ |