/bmsync local does not work
Ghostlyr opened this issue ยท 3 comments
Each time when I remove banned player directly from the database, they can not log on to the server, even though the execution bmsync command (reports the successful execution) and enabled sync schedules.
Also enabled checkOnJoin function, but this does not affect anything.
No any errors and warnings in logs. Resolves an issue only unbanning player on server or restarting.
Using 99 beta build on last Thermos 1.7.10.
In addition to deleting the ban in bm_player_bans you also need to create the record in bm_player_ban_records. Syncing will then work correctly.
I have tried to do this - to simulate the behavior of the plugin. But even ban player on one server, then unban on a different server, then running this command on first server does not affect anything. Player can't connect to server...
You need to ensure the created and updated timestamps are also correct.
E.g.
mysqli_query($mysqlicon, "INSERT INTO ".$server['playerBanRecordsTable']." (player_id, reason, expired, actor_id, pastActor_id, pastCreated, created) SELECT b.player_id, b.reason, b.expires, UNHEX('$consoleId'), b.actor_id, b.created, UNIX_TIMESTAMP(now()) FROM ".$server['playerBansTable']." AS b WHERE b.id = '".$_GET['id']."'");
// Now delete it
mysqli_query($mysqlicon, "DELETE FROM ".$server['playerBansTable']." WHERE id = '".$_GET['id']."'");
https://github.com/BanManagement/BanManager-WebUI/blob/master/ajax/deleteban.php#L39-L41
You should also check your schedules.yml files, and modify the timers accordingly. Alternatively, you can enable checkOnJoin in your config.