diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-16 20:28:52 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-04-16 20:28:52 +0000 |
commit | fc4f89e0798ede80ce5b26b2b28423390e70db08 (patch) | |
tree | b8208e30637c096f17702e79e375e4c9e0c4f574 /include/modules.h | |
parent | 723e3f2ce02865870b2a6d7ccb999eb693ac87ad (diff) |
Add Command::SetPermission member to centralise access checking. Remove duplicated comments at the same time.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2282 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/modules.h b/include/modules.h index 927dbeb26..90c307b41 100644 --- a/include/modules.h +++ b/include/modules.h @@ -231,6 +231,7 @@ class CoreExport Command size_t MaxParams; size_t MinParams; std::string name; + std::string permission; /** Create a new command. * @param min_params The minimum number of parameters the parser will require to execute this command @@ -274,6 +275,11 @@ class CoreExport Command */ 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 + */ + void SetPermission(const std::string &reststr); + char *help_param1; char *help_param2; char *help_param3; |