RCON commands
Run a command on the console of your game server when a product is paid, expires or is refunded.
Setting it up
Under Dashboard → Connections, create a connection of type RCON with the address, the port and the RCON password of the server. The test button confirms that Sellitex can connect. Then, on the product, add a delivery action of type RCON command and pick the connection.
The server has to accept RCON connections coming from the internet. Private or internal addresses are refused.
The command
The command is a text of 2 to 500 characters, sent to the server exactly as you wrote it, with the placeholders replaced by the purchase data. An example that gives the player a rank:
lp user {{nickname}} parent set vipPlaceholders
The product has to ask the buyer for every field the command uses. If the command has {{nickname}}, tick Nickname under "Ask the buyer for", or the product is not saved.
| Placeholder | Value |
|---|---|
| {{quantity}} | How many units of this item the buyer took. |
| {{duration}} | The duration of the purchased variant, number only. Empty when the variant has no duration. |
| {{duration_unit}} | The unit of the duration: minutes, hours, days or months. |
| {{product}} | The product name. |
| {{variant}} | The name of the purchased variant. |
| {{nickname}} | The nickname the buyer gave at checkout. |
| {{discord_id}} | The Discord user ID of the buyer, 17 to 20 digits. |
| {{player_id}} | The player ID the buyer gave at checkout. |
| {{note}} | The free-text note the buyer wrote at checkout. |
The last five only have a value when the product asks the buyer for that field, under "Ask the buyer for". A field that was not asked for becomes empty text.
More than one unit
When the buyer takes more than one unit, the command runs once per unit. The interval between repeats is configurable, from 0 to 300 seconds. So do not multiply by {{quantity}} inside the command: three units already run the command three times.
Expiry and refund
A command that has already run cannot be undone by Sellitex. To take back what was given, create another action on the same product with the on_expire or on_refund trigger and the reverse command:
lp user {{nickname}} parent set defaultLimits
The whole exchange with the server, from connecting to the reply, has to finish in 15 seconds. The final command, with the placeholders already replaced, can have up to 4,096 bytes. The reply of the server is read up to 64 KiB, and only its first packet is kept.
Retries
If the connection fails, the password is refused or the server does not answer in time, the delivery is tried again in 5 minutes, then in 30 minutes and then in 2 hours, up to 4 attempts in total. After that it is marked as failed on the order, and the store team can resend it from the dashboard.