mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add additional check to avoid broadcasting private messages in error conditions
This commit is contained in:
parent
6a3fa9df12
commit
e7c2e61b19
1 changed files with 4 additions and 0 deletions
|
@ -4385,6 +4385,10 @@ void Server::notifyPlayer(const char *name, const std::wstring msg, const bool p
|
||||||
Player *player = m_env->getPlayer(name);
|
Player *player = m_env->getPlayer(name);
|
||||||
if(!player)
|
if(!player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (player->peer_id == PEER_ID_INEXISTENT)
|
||||||
|
return;
|
||||||
|
|
||||||
if (prepend)
|
if (prepend)
|
||||||
SendChatMessage(player->peer_id, std::wstring(L"Server -!- ")+msg);
|
SendChatMessage(player->peer_id, std::wstring(L"Server -!- ")+msg);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue