feat(Block Join): fallback on breakup kick if block join fails (#1279)
This commit is contained in:
parent
68435ebd6d
commit
fb55dc1dd9
@ -1,3 +1,4 @@
|
|||||||
|
#include "backend/player_command.hpp"
|
||||||
#include "core/data/admin_rids.hpp"
|
#include "core/data/admin_rids.hpp"
|
||||||
#include "core/globals.hpp"
|
#include "core/globals.hpp"
|
||||||
#include "fiber_pool.hpp"
|
#include "fiber_pool.hpp"
|
||||||
@ -76,7 +77,9 @@ namespace big
|
|||||||
net_player_data->m_gamer_handle.m_rockstar_id)));
|
net_player_data->m_gamer_handle.m_rockstar_id)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto id = player->m_player_id;
|
auto id = player->m_player_id;
|
||||||
|
|
||||||
g_fiber_pool->queue_job([id] {
|
g_fiber_pool->queue_job([id] {
|
||||||
if (auto plyr = g_player_service->get_by_id(id))
|
if (auto plyr = g_player_service->get_by_id(id))
|
||||||
{
|
{
|
||||||
@ -98,6 +101,14 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (plyr->block_join)
|
||||||
|
{
|
||||||
|
dynamic_cast<player_command*>(command::get(RAGE_JOAAT("breakup")))->call(plyr, {});
|
||||||
|
g_notification_service->push("Block Join",
|
||||||
|
std::format("Block Join method failed for {}, sending breakup kick instead...",
|
||||||
|
plyr->get_net_data()->m_name));
|
||||||
|
LOG(WARNING) << "Sending Breakup Kick due to block join failure... ";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user