Add log-only BB account sync logout hook

This commit is contained in:
2026-06-08 04:02:11 -04:00
parent fe97a0dda4
commit 94250d21eb
2 changed files with 18 additions and 0 deletions
+11
View File
@@ -48,4 +48,15 @@ inline void notify_bb_login_start(
static_cast<unsigned int>(connection_phase));
}
inline void notify_bb_login_end(
uint32_t account_id,
const std::string& bb_username,
int64_t character_slot) {
std::fprintf(stderr,
"[AccountSync] event=bb_login_end account_id=%010u bb_username=%s character_slot=%lld\n",
static_cast<unsigned int>(account_id),
bb_username.c_str(),
static_cast<long long>(character_slot));
}
} // namespace AccountSync
+7
View File
@@ -233,6 +233,13 @@ Client::~Client() {
if ((this->version() == Version::BB_V4) && (this->character_data.get())) {
this->save_all();
if (this->login && this->login->account && this->login->bb_license) {
AccountSync::notify_bb_login_end(
this->login->account->account_id,
this->login->bb_license->username,
this->bb_character_index);
}
}
this->log.info_f("Deleted");
}