Synchronization with the database
GedeonGrays opened this issue ยท 4 comments
Hello o/
Here's the situation:
I need to unban a player by deleting a record from the database. But the command /bminfo still displays the status of the player as banned. Even after the command /bmsync local (only local database is configured) the result is the same.
This is not a problem of displaying information in the console, because the player can not join the server.
Could you fix the /bmsync command, or synchronize the database when every time you can?
P. S. If you know another way to accomplish my task, please tell me. Thank you in advance for your time.
How are you unbanning the player? If directly via the database, simply removing the row from the ban table is not enough. You also need to create an unban record in the relevant _records table. Otherwise the ban will not be removed until the server is restarted.
See the WebUI implementations:
Latest: https://github.com/BanManagement/BanManager-WebUI/blob/master/server/graphql/resolvers/mutations/delete-player-ban.js#L26-L59
Legacy: https://github.com/BanManagement/BanManager-WebUI/blob/legacy/ajax/deleteban.php#L22-L32
You also need to create an unban record in the relevant _records table.
And after creating an unban record in the relevant _records table, do I need to write /bmsync?
No, each server will poll based on their timings https://banmanagement.com/docs/banmanager/configuration/schedules-yml#playerbans
Feel free to join the Discord server for implementation questions, GitHub tends to be used for bug reporting/feature suggestions rather than support ๐