Staffmode is a plugin that allows the toggling from one group (or set) to another group (set). This plugin is intended for staff groups, but it can be used to toggle other groups.
Note, the command used below is the default command. If you changed the command in the config, use that one instead of "/staffmode"
This plugin's soul purpose is to provide time frames in which playing staff members could potentially abuse. By using an OffDutyGroup, a staff member's permissions could be limited until they toggle into their OnDutyGroup. This can drastically reduce the time it takes to investigate potential abusive staff.
For example:
Off Duty Group Permissions - mute, kick, ban
On Duty Group Permissions - noclip, vanish, remove, unlock chests, force tp, ect.
If given permission for two groups with two different Auth levels, the highest on this list will take priority. For example, if I gave myself permission for "Mod" and "Headadmin," I would get Auth level 1 instead of 2. If I wanted Auth level 2, I would put "Admin" above "Mod" in the list.
Auth level (if set to 1 or 2) will also be assigned to the player, using these console commands:
moderatorid "exampleid" --- Level 1
ownerid "exampleid" --- Level 2
Re logging will allow the use of Auth level to the fullest extent, unlike the "IsAdmin" flag.
The commands will not run if the "AuthLevel" setting is 0.
If DisconnectOnToggle is false,
If the AuthLevel value is set to 1 or 2, the player will be given the "IsAdmin" flag, which does not give access to all available Rust console commands (i.e status, any "ent" command, ect). There is no better way to do this without requiring a disconnect.
The flag will not be set if the "AuthLevel" setting is 0.
Off and On Duty Groups
See Using Oxide's permission system | Oxide to learn how to create Oxide permission groups and how to grant permissions.
If you have any questions, post in the support forum and I'll get back to you as soon as possible.
Note, the command used below is the default command. If you changed the command in the config, use that one instead of "/staffmode"
Features
- Toggles to/from multiple different oxide permission groups
- Logging on toggle
- Toggles in/out of set auth level/admin status
- Customizable permissions
- Customizable command
- Ingame group editor
- Prevent staff from damaging, hurting, and/or looting while in staff mode
This plugin's soul purpose is to provide time frames in which playing staff members could potentially abuse. By using an OffDutyGroup, a staff member's permissions could be limited until they toggle into their OnDutyGroup. This can drastically reduce the time it takes to investigate potential abusive staff.
For example:
Off Duty Group Permissions - mute, kick, ban
On Duty Group Permissions - noclip, vanish, remove, unlock chests, force tp, ect.
Commands
This plugin provides both chat and console commands using the same syntax. When using a command in chat, prefix it with a forward slash: `/`.- /staffmode - Toggles staff status if granted permission(s) - command interchangeable.
- /staffmode group create [groupname] - Creates a group in the "Staffmode_Groups" data file
- /staffmode group remove [groupname] - Removes a group from the "Staffmode_Groups" data file
- /staffmode group edit [groupname] - Adds a group to the editor
Console Commands
- checkgroups - Runs data check
- /staffmode edit [value] [setting]
- offdutygroup -- Must be an existing oxide permission group
- ondutygroup -- Must be an existing oxide permission group
- authlevel -- Must be 0, 1 or 2
- permission -- Can be a duplicate permission, but warning will be given
Configuration
The settings and options can be configured in the Staffmode file under the config directory. The use of an editor and validator is recommended to avoid formatting issues and syntax errors.- PluginPrefix - Determines the prefix of the plugin when sending messages. If you want to disable the prefix, remove the prefix but leave the quotes.
- EditPermission - Customizable permission node that is required to use the "/staffmode group" or "/staffmode edit" command. This permission is not required to use "/staffmode"
- AnnounceOnToggle - If true, a message will broadcast to the rest of the server when a person uses /toggle.
- LogOnToggle - If true, a message will be logged to console when a person uses /staffmode.
- DisconnectOnToggle - If true, the person who toggles is forced to disconnect (see note below about Auth Level)
- EnableGroupToggle - If true, the plugin will change the groups of a player when they /staffmode, and check for null group settings.
- CheckGroupDataOnLoad - Runs data check when the plugin is loaded.
- Dev - Disables disconnecting after toggle but leaves messages in place. Not meant for non-testing uses.
- ConfigVersion - Version number that can trigger a config update message (if one is needed).
- CanAttack - Determines if the player (in staffmode) can attack/gather/shoot/etc. anything, nullifies damage if set to false.
- CanBeTargetedByHeliAndTurrets - Determines if the player (in staffmode) can be targeted by the helicopter or turrets.
- CanLootPlayer - Determines if the player (in staffmode) can loot other players' bodies. Does not block looting chests.
- ShowMessages (modifiers only) - Determines if messages "OnAttack" and "OnLootPlayer" are shown.
Localization
The default messages are in the Staffmode file under the lang/en directory. To add support for another language, create a new language folder (e.g. de for German) if not already created, copy the default language file to the new folder and then customize the messages.Example Group Data File
- GroupName - Name of the group, does not have any plugin use until the group is corrupted.
- AuthLevel - 1 and 2 both have admin privileges. Any value other than 1, 2 or 0 will give an error message in console on toggle. Below is some more information about AuthLevel.
- OffDutyGroup - Off duty player group (below is some more details about this setting). Requires an oxide permission group if EnableGroupToggle is true.
- OnDutyGroup - On duty player group (below is some more details about this setting). Requires an oxide permission group if EnableGroupToggle is true.
- PermissionNode - Permission registered and used to check for permission. See Using Oxide's permission system | Oxide
If given permission for two groups with two different Auth levels, the highest on this list will take priority. For example, if I gave myself permission for "Mod" and "Headadmin," I would get Auth level 1 instead of 2. If I wanted Auth level 2, I would put "Admin" above "Mod" in the list.
Auth level (if set to 1 or 2) will also be assigned to the player, using these console commands:
moderatorid "exampleid" --- Level 1
ownerid "exampleid" --- Level 2
Re logging will allow the use of Auth level to the fullest extent, unlike the "IsAdmin" flag.
The commands will not run if the "AuthLevel" setting is 0.
If DisconnectOnToggle is false,
If the AuthLevel value is set to 1 or 2, the player will be given the "IsAdmin" flag, which does not give access to all available Rust console commands (i.e status, any "ent" command, ect). There is no better way to do this without requiring a disconnect.
The flag will not be set if the "AuthLevel" setting is 0.
Off and On Duty Groups
See Using Oxide's permission system | Oxide to learn how to create Oxide permission groups and how to grant permissions.
If you have any questions, post in the support forum and I'll get back to you as soon as possible.