SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
77 stars 29 forks source link

Fix Unexpected Behavior in UnturnedPlayer.Ban #1

Closed Kr4ken-9 closed 4 years ago

Kr4ken-9 commented 4 years ago

https://github.com/SmartlyDressedGames/Unturned-3.x-Community/issues/1667

Copy-pasted description:

I believe, although I cannot be sure, that UnturnedPlayer.Ban is using Provider.ban as seen here

Using Provider.ban results in the player being kicked but the duration not applying, and the ban not being saved in SteamBlacklist.list.

If someone were to use UnturnedPlayer.Ban they would probably expect it to last the duration they specify. To correct this, I believe UnturnedPlayer.Ban should be using Provider.requestBanPlayer instead.

This PR replaces Provider.ban with Provider.requestBanPlayer to correct the problem.

SDGNelson commented 4 years ago

Thanks for the report! This will be fixed in the next release, and your issue is credited in the changelog.