From c3370ee4b57d18a62510240f105791ca3b403224 Mon Sep 17 00:00:00 2001 From: MadCamel Date: Thu, 14 Oct 2010 10:38:04 +0200 Subject: Disable showing of IP addresses while taking a screenshot This could potentially leak confidential information. Reviewed-by: cody --- src/game.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 66b6e3c4..270affb5 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -279,8 +279,23 @@ static bool saveScreenshot() { static unsigned int screenshotCount = 0; + // We don't want to show IP addresses in screenshots + const bool showip = player_node->getShowIp(); + if (showip) + { + player_node->setShowIp(false); + beingManager->updatePlayerNames(); + gui->draw(); + } + SDL_Surface *screenshot = graphics->getScreenshot(); + if (showip) + { + player_node->setShowIp(true); + beingManager->updatePlayerNames(); + } + // Search for an unused screenshot name std::stringstream filenameSuffix; std::stringstream filename; -- cgit v1.2.3-70-g09d2