1
0
mirror of https://github.com/anope/anope.git synced 2026-07-10 05:23:14 +02:00

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
This commit is contained in:
rburchell
2009-04-16 20:28:52 +00:00
parent 723e3f2ce0
commit fc4f89e079
2 changed files with 22 additions and 21 deletions
+6
View File
@@ -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;