diff --git a/src/AccountSync.hh b/src/AccountSync.hh index 5b797f34..0ab3b578 100644 --- a/src/AccountSync.hh +++ b/src/AccountSync.hh @@ -48,4 +48,15 @@ inline void notify_bb_login_start( static_cast(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(account_id), + bb_username.c_str(), + static_cast(character_slot)); +} + } // namespace AccountSync diff --git a/src/Client.cc b/src/Client.cc index cca299f4..fad4c7c7 100644 --- a/src/Client.cc +++ b/src/Client.cc @@ -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"); }