Skip to content

Commit

Permalink
Add additional check to avoid broadcasting private messages in error …
Browse files Browse the repository at this point in the history
…conditions
  • Loading branch information
sapier authored and sapier committed Feb 2, 2014
1 parent 6a3fa9d commit e7c2e61
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server.cpp
Expand Up @@ -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
Expand Down

0 comments on commit e7c2e61

Please sign in to comment.