mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-17 23:07:26 +08:00
fix: Prevent autokick of friends and trusted (#2989)
This commit is contained in:
parent
77137973b2
commit
65cabdc11f
@ -12,6 +12,10 @@ namespace big
|
|||||||
if (kick_host && !bLastKickHost)
|
if (kick_host && !bLastKickHost)
|
||||||
{
|
{
|
||||||
g_player_service->iterate([](auto& plyr) {
|
g_player_service->iterate([](auto& plyr) {
|
||||||
|
// Don't kick trusted players
|
||||||
|
if (plyr.second->is_trusted || (g.session.trust_friends && plyr.second->is_friend()))
|
||||||
|
return;
|
||||||
|
|
||||||
if (plyr.second->is_host())
|
if (plyr.second->is_host())
|
||||||
{
|
{
|
||||||
dynamic_cast<player_command*>(command::get("multikick"_J))->call(plyr.second, {});
|
dynamic_cast<player_command*>(command::get("multikick"_J))->call(plyr.second, {});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user