Access | |
otlib | |
otlib. | |
Denied Levels | This is used in InvalidCondition, a return from otlib.group.CheckAccess to specify what part of the access level an access check failed on. |
Init | Called when a new InvalidCondition object is created by using the prototype as a functor. |
SetLevel | Sets the level for this invalid condition, see Denied Levels. |
GetLevel | Gets the level for the invalid condition, see Denied Levels. |
SetParameterNum | Sets the parameter number the invalid condition occured on. |
GetParameterNum | Gets the parameter number the invalid condition occured on, if applicable. |
GetMessage | Gets the message for the invalid condition, if one has been created yet. |
InvalidConditions | |
Access Registration | |
otlib. | Each registered access represents a single permission. |
Register | Registers a new access object. |
Group Access | |
GetGroup | |
otlib. | |
User Access | |
CheckAccess | Checks if a user or group can use an access with specified, possibly parsed arguments. |
Denied Levels | This is used in InvalidCondition, a return from otlib.group.CheckAccess to specify what part of the access level an access check failed on. |
Init | Called when a new InvalidCondition object is created by using the prototype as a functor. |
SetLevel | Sets the level for this invalid condition, see Denied Levels. |
GetLevel | Gets the level for the invalid condition, see Denied Levels. |
SetParameterNum | Sets the parameter number the invalid condition occured on. |
GetParameterNum | Gets the parameter number the invalid condition occured on, if applicable. |
GetMessage | Gets the message for the invalid condition, if one has been created yet. |
InvalidConditions |
This is used in InvalidCondition, a return from otlib.group.CheckAccess to specify what part of the access level an access check failed on.
function InvalidCondition:Init( ... )
Called when a new InvalidCondition object is created by using the prototype as a functor.
... | If this immediate parent of this new object is InvalidCondition (setuping up a new invalid condition), this value should be a single string specifying the unformatted message for the condition. Otherwise, if the condition is already setup, the values should be any number of any type which is directly passed into format on the unformatted string. |
v1.00 | Initial. |
function InvalidCondition:SetLevel( level )
Sets the level for this invalid condition, see Denied Levels.
level | The level to set to. |
Self.
v1.00 | Initial. |
function InvalidCondition:GetLevel()
Gets the level for the invalid condition, see Denied Levels.
The level.
v1.00 | Initial. |
Each registered access represents a single permission. For example, you would want to register a separate access for each command, and you’d want to register a separate access for special actions such as the ability to hear admins’ private chat.
Register | Registers a new access object. |
User Access | |
CheckAccess | Checks if a user or group can use an access with specified, possibly parsed arguments. |
function group:CheckAccess( access, ... )
Checks if a user or group can use an access with specified, possibly parsed arguments. ‘Possibly parsed arguments’ simply means that numbers should come in as number or string types, bools as bools or strings, etc.
access | The access object to check permission against. |
... | Optional, any number of arguments of any type to check the permission against. |
1 | A boolean of whether or not they have permission to the access object taking the specified parameters into account. |
2 | An InvalidCondition object if they don’t have permission, a list table of the parsed arguments if they do. |
v1.00 | Initial. |
Checks if a user or group can use an access with specified, possibly parsed arguments.
function group:CheckAccess( access, ... )
Called when a new InvalidCondition object is created by using the prototype as a functor.
function InvalidCondition:Init( ... )
Sets the level for this invalid condition, see Denied Levels.
function InvalidCondition:SetLevel( level )
Gets the level for the invalid condition, see Denied Levels.
function InvalidCondition:GetLevel()
Sets the parameter number the invalid condition occured on.
function InvalidCondition:SetParameterNum( num )
Gets the parameter number the invalid condition occured on, if applicable.
function InvalidCondition:GetParameterNum()
Gets the message for the invalid condition, if one has been created yet.
function InvalidCondition:GetMessage()
Registers a new access object.
function access:Register( tag, ... )
function GetGroup( group )