Powerful software for playing games through text, supporting remote collaborative play.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

15 KiB

This page documents the permissions system for TRBot.

Durations

Several aspects of the permissions system can be applied either indefinitely or for a period of time. Here are the modifiers available:

  • "null" - Indefinite duration
  • "ms" - Duration in milliseconds (Ex. "500ms")
  • "s" - Duration in seconds (Ex. "10s")
  • "m" - Duration in minutes (Ex. "30m")
  • "h" - Duration in hours (Ex. "4h")
  • "d" - Duration in days (Ex. "75d")

User-specific Restricted Inputs

TRBot supports restricting specific users from making specific inputs. Each user has a set of restricted inputs, which can be viewed in the RestrictedInputs table of the database. Restricted inputs are console-specific and can last either indefinitely or for a specific amount of time.

Example: "!restrictinput user1 gc a 30m" - Prevents user1 from pressing the "a" button on the GameCube console for 30 minutes.

Example: "!restrictinput user2 ps2 square null" - Prevents user2 from pressing the "square" button on the PlayStation 2 console indefinitely.

Example: "!unrestrictinput user2 ps2 square" - Lifts the restriction on user2 pressing the "square" button on the PlayStation 2.

Access Level Overview

Each user has an access level. The access levels are as follows:

  • 0 (User)
  • 10 (Whitelisted)
  • 20 (VIP)
  • 30 (Moderator)
  • 40 (Admin)
  • 50 (Superadmin)

Each user starts out at level 0 (User) by default. They can be auto-promoted to another level if they perform enough valid inputs based on the auto promote settings configured in the database. Otherwise, users can be promoted by Moderators and up, but not up to their own level. For example, an Admin can change a user's level to Moderator and below, but not up to Admin. Likewise, a Superadmin can promote anyone to Admin and below, but cannot promote anyone else to Superadmin.

To view your own access level or another user's access level, use the LevelCommand (Default: "!level"), and to set a user's access level, use the SetUserLevelCommand (Default: "!setlevel").

It's recommended for the streamer to set their own level to 50 (Superadmin) in the database, then update their own abilities with the UpdateAllUserAbilitiesCommand (Default: "!updateabilities").

Ability Overview

Abilities are a large part of the moderation features TRBot provides. These abilities are another layer on top of the access level system, and they define what users can and cannot do.

  • PermissionAbilities are static and simply define all the available abilities. They are stored in the PermissionAbilities table of the database. You can list all available PermissionAbilities with the ListPermissionAbilitiesCommand (Default: "!allabilities").
  • UserAbilities are specific to each user and can be enabled or disabled either indefinitely or for a period of time. They are stored in the UserAbilities table of the database. You can list all abilities on a user with the ListUserAbilitiesCommand (Default: "!userabilities").

The ability system is robust and flexible. For example, if you want to prevent a troll from making any inputs to chat, you can enable the silenced ability on them for 30 minutes.

To enable or disable abilities on a user, use the UpdateUserAbilityCommand (Default: "!toggleability").

Each access level has different commands available to them, determined by the CommandData table in the database. If a user attempts to perform a command without a sufficient access level, they will be denied.

Each access level also has different abilities available to them by default, which will be outlined below. Upon changing levels, a user's abilities will be automatically adjusted. Users can also update their own abilities with the UpdateAllUserAbilitiesCommand (Default: "!updateabilities") to obtain all abilities they should have at their level and remove any that they shouldn't. It's recommended to do this after changing a user's access level directly through the database. This will not cleanse a user of abilities enabled/disabled from a higher-leveled user than themselves, meaning a troll can't use this command to remove their silence.

All Abilities

silenced

Determines if the user can perform inputs. If enabled, the user cannot perform inputs.

userdefaultinputdur

Determines the user's specific default input duration.

usermaxinputdur

Determines the user's specific maximum input sequence duration.

usermidinputdelay

Determines the user's specific mid input delay duration.

bet

Default level: User (0)

Determines if the user can bet with the BetCreditsCommand.

duel

Default level: User (0)

Determines if the user can duel other users with the DuelCommand.

groupbet

Default level: User (0)

Determines if the user can participate in a group bet through the EnterGroupBetCommand.

inputexercise

Default level: User (0)

Determines if the user can generate and solve input exercises through the InputExerciseCommand.

calculate

Default level: User (0)

Determines if the user can calculate expressions through the CalculateCommand.

chatbot

Default level: User (0)

Determines if the user can speak with a chatbot through the ChatbotCommand.

bingo

Default level: User (0)

Determines if the user can interact with a bingo board through the BingoCommand.

transfer

Default level: User (0)

Determines if the user can transfer credits to others through the TransferCreditsCommand.

slots

Default level: User (0)

Determines if the user can play the slots through the SlotsCommand.

voteinputmode

Default level: User (0)

Determines if the user can vote to change the input mode through the VoteForInputModeCommand. This permission applies when a vote is already started.

addinputmacro

Default level: User (0)

Determines if the user can add an input macro through the AddMacroCommand.

removeinputmacro

Default level: User (0)

Determines if the user can remove an input macro through the RemoveMacroCommand.

addmeme

Default level: User (0)

Determines if the user can add a meme through the AddMemeCommand.

removememe

Default level: User (0)

Determines if the user can remove a meme through the RemoveMemeCommand.

addinputsynonym

Default level: User (0)

Determines if the user can add an input synonym through the AddInputSynonymCommand.

removeinputsynonym

Default level: User (0)

Determines if the user can remove an input synonym through the RemoveInputSynonymCommand.

stopallinputs

Default level: User (0)

Determines if the user can stop all ongoing inputs with the StopAllInputsCommand.

simulate

Default level: User (0)

Determines if the user can simulate themselves or others with the UserSimulateCommand.

setgamemessage

Default level: VIP (20)

Determines if the user can set the game message displayed on screen through the SetGameMessageCommand.

setconsole

Default level: Moderator (30)

Determines if the user can set the active game console through the GetSetConsoleCommand.

setdefaultinputdur

Default level: Moderator (30)

Determines if the user can set the global default input duration through the DefaultInputDurCommand.

setmaxinputdur

Default level: Moderator (30)

Determines if the user can set the global maximum input sequence duration through the MaxInputDurCommand.

setmidinputdelay

Default level: Moderator (30)

Determines if the user can toggle the global mid input delay and set its duration through the MidInputDelayCommand.

setteamsmode

Default level: Moderator (30)

Determines if the user can enable or disable teams mode through the GetSetTeamsModeCommand.

setteamsmodemaxport

Default level: Moderator (30)

Determines if the user can set the max controller port available for teams mode through the GetSetTeamsModeMaxPortCommand.

setperiodicinput

Default level: Moderator (30)

Determines if the user can enable or disable the periodic input through the TogglePeriodicInputCommand.

setperiodicinputport

Default level: Moderator (30)

Determines if the user can set the default periodic input controller port through the GetSetPeriodicInputPortCommand.

setperiodicinputtime

Default level: Moderator (30)

Determines if the user can set the periodic input interval through the GetSetPeriodicInputTimeCommand.

setperiodicinputsequence

Default level: Moderator (30)

Determines if the user can set the periodic input sequence through the GetSetPeriodicInputSequenceCommand.

Attempting to set this causes the command to undergo steps to validate that the user setting this value cannot bypass their normal input restrictions. This includes comparing the user's level to the global input permission level and the permission level of each input in the input sequence, checking the user's restricted inputs, and verifying the controller port for each input.

setperiodicinputmessage

Default level: Moderator (30)

Determines if the user can enable or disable the periodic input message through the TogglePeriodicInputMessageCommand.

setmaxuserrecentinputs

Default level: Moderator (30)

Determines if the user can set the max number of recent inputs stored per user through the GetSetMaxUserRecentInputsCommand.

A value of 0 will essentially disable the feature. Any excess recent inputs stored above the limit will be removed next time a new one is added.

startvoteinputmode

Default level: Moderator (30)

Determines if the user can start a vote to change the input mode through the VoteForInputModeCommand. This permission applies only when starting a vote.

updateotheruserabilities

Default level: Admin (40)

Determines if the user can update other users' abilities through the UpdateAllUserAbilitiesCommand.

setglobalinputlevel

Default level: Admin (40)

Determines if the user can set the global minimum access level to perform inputs through the GlobalInputPermissionsCommand.

setvcontrollertype

Default level: Admin (40)

Determines if the user can set the virtual controller type through the VirtualControllerCommand.

setvcontrollercount

Default level: Admin (40)

Determines if the user can set the number of virtual controllers available through the ControllerCountCommand.

setdemocracyvotetime

Default level: Admin (40)

Determines if the user can set the Democracy vote time through the GetSetDemocracyVoteTimeCommand.

setdemocracyresolutionmode

Default level: Admin (40)

Determines if the user can set the Democracy resolution mode through the GetSetDemocracyResModeCommand.

setinputmode

Default level: Admin (40)

Determines if the user can directly set the input mode through the GetSetInputModeCommand.

setinputmodevotetime

Default level: Admin (40)

Determines if the user can set the length of the voting period when changing the input mode.

setinputmodechangecooldown

Default level: Admin (40)

Determines if the user can set the cooldown after voting for an input mode.