Jump to content

Disbanded team restore 1.5.1

$4.99
   (0 reviews)

1 Screenshot

  • 5.6k
  • 29
  • 14.99 kB
 Share

About Disbanded team restore

TL;DR: This plugin restores lost player teams after a server crash.
In some cases, after an unsuccessful shutdown or a server crash, all player teams get disbanded and no one knows why.
Facepunch knows about this issue for years but since it happens rarely and sporadically, it seems that they can't fix it.

This leads to many annoying problems like
- players can't open doors with locks that were placed by their (former) team mates and therefore will be trapped in the base until suicide (ingame)
- players are beeing attacked by their "own" turrets and traps
- players can't access the tool cupboard and chests since the building priviledge of the former team owner is not shared anymore.


How does it work?
This plugin is simple, has just four optional chat/console commands, one permissions and a very short configuration.
It just saves all Rust teams to a data file on the following events/hooks:
- OnServerSave
- OnTeamCreated (removed, unnecessary)
- OnTeamLeave (removed, unnecessary)
- OnTeamAcceptInvite (removed, unnecessary)
- OnTeamDisbanded (removed, unnecessary)
- OnTeamKick (removed, unnecessary)
- OnTeamPromote (removed, unnecessary)
- OnServerShutdown
- Unload

Only this last two hooks tell the plugin that the shutdown was sucessful and planned by setting a flag.
If the server (re)starts and this flag is NOT set, it knows that the server crashed or the process was killed.
In this case the plugin restores all teams and you are good to go.

Permissions:
DisbandedTeamRestore.admin
Player can list, disband and restore all teams

Commands:
/dtr.saveteams
    Saves the currently existing teams to the data file
/dtr.restoreteams
   Disbands all currently existing teams and restores the teams from the data file
/dtr.disbandteams
    Disbands all currently existing teams
/dtr.listteams
    Lists all teams with ID, leader and members. Outputs to chat, if ran by a player via ingame chat, or to server console if run from - you guessed it - the server console.

Config file:
"Keep all backups, not only the last" set to "true" will create a backup data file for the teams on every call of the above mention events/hooks, instead of just one backup file.
Don't worry, each file is only a few bytes in size, they won't bloat your hard drive.

Debugging/Troubleshooting:
By setting the variable "debug" to "true" (in the plugin file, not in the config file!) you can enable verbose logging into the server console.

Roadmap:
- Make it work with "Automatic authorization". Done. After the teams are restored, the players are automatically authorized on TCs, turrets and doors/locks if the plugin "Automatic authorization" is used
- Add a config option to force restore all teams on server start (even if the server did not crash)
- ...

Feel free to DM me your suggestions!


21mac21's Collection

User Feedback

1.2m

Downloads

Total number of downloads.

6.1k

Customers

Total customers served.

90.3k

Files Sold

Total number of files sold.

1.8m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.