MarechJ / hll_rcon_tool

Hell Let Loose Community RCON, CRCON for short. An alternative rcon client for HLL. It is a web application with many features, historical data, statistics, discord integrations, etc
MIT License
103 stars 71 forks source link

Orphaned RCON Temporary Bans Preventing Removal of Permanent Bans/Blacklist #150

Closed cemathey closed 1 year ago

cemathey commented 1 year ago

The game server appears to retain expired temporary bans under certain (unknown) conditions. Removing these temporary bans fail (not a Community RCON bug, it fails with the official RCON client as well).

ServerCTL.do_unban() first removes a temporary ban and then removes a permanent ban from a player, however if the player has one of these expired and irremovable temporary bans it is not possible to remove the permanent ban through CRCON.

The permanent ban can be removed through direct CRCON API use, through the official RCON client or (presumably) through the Battlemetrics RCON but I have not attempted that.

I think this is an easy fix and I will knock out a quick patch that will allow permanent bans to be removed correctly when these expired temporary bans exist.

I am also filing a bug with the developers for the lingering temporary ban bug.

Unfortunately since this appears to be a bug with the game server the /player/<steam ID> view will incorrectly report temporary bans, I think we could probably work around that by parsing the ban string and explicitly filtering out expired temporary bans. However the timestamp saved on the game server (the banlist string required to unban a player) appears to use the local time zone of the game server itself and this seems impractical to be able to deduce and requiring CRCON users to manually set it also seems impractical.

We could likely deduce the game servers time zone by temporarily banning a fake player, inquiring and then unbanning said player, but it is unknown if the game server is using a simple UTC offset, or if it's using an actual time zone aware timestamp dates and times are really complicated so I don't think that is practical.

cemathey commented 1 year ago

Restarting your game server does remove these expired bans.