From: sapier Date: Sun, 2 Feb 2014 00:55:24 +0000 (+0100) Subject: Add additional check to avoid broadcasting private messages in error conditions X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=e7c2e61b19d24da14617e5689cad1a2d1ba1daec;p=zefram%2Fminetest%2Fminetest_engine.git Add additional check to avoid broadcasting private messages in error conditions --- diff --git a/src/server.cpp b/src/server.cpp index 5b799eb2..5dde78e6 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -4385,6 +4385,10 @@ void Server::notifyPlayer(const char *name, const std::wstring msg, const bool p Player *player = m_env->getPlayer(name); if(!player) return; + + if (player->peer_id == PEER_ID_INEXISTENT) + return; + if (prepend) SendChatMessage(player->peer_id, std::wstring(L"Server -!- ")+msg); else