Tracks

If you ever used Permissions 3, you would know that a track enables you to specify an order of promotion within P3. Tracks in PExChat work similarly, however instead of being ranks in a ladder, tracks are just a way of referring to groups of groups. Tracks can also have a priority specified, tracks with a lower number priority will have their groups shown before tracks with higher number priorities.

An example of a track in the config follows:

tracks:

default:

priority: 1
groups:
- Default

sometrack:

priority: 2
groups:
- Derp


Setting up tracks as above will replace the +groups tag with the following, differing from the order above:
[Default][Derp]

Note that because the group "Herp" was not listed in a track, the output of the +groups tag will not include the group. To disable a track from being shown, set it's priority to zero.

Track variables can also be accessed directly. Assuming a user is only in one group in a track, variables of that group in the track which the user is in can be accessed directly by putting any of the following tags "+prefix.{trackname}", "+suffix.{trackname}" and "+group.{trackname}" where {trackname} is the name given to the track under the tracks property. These tags can be placed anywhere in the message-format property.

Example: for a user in groups herp, derp and default with track config as below:

tracks:

default:

priority: 1
groups:
- Default

sometrack:

priority: 2
groups:
- Derp

anothertrack:

priority: 0
groups:
- Herp

message-format: '+groups <+prefix.anothertrack+group.anothertrack+suffix.anothertrack> +name: +message'

This configuration would result in the following output:
"[Default][Derp] <Herp> playername: message!"


Comments

Posts Quoted:
Reply
Clear All Quotes