summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2010-10-14 10:38:04 +0200
committerStefan Dombrowski <stefan@uni-bonn.de>2010-10-14 16:55:30 +0200
commitc3370ee4b57d18a62510240f105791ca3b403224 (patch)
tree0e0eb016039b77f558ef5790dd18d4940738d2ac /src/game.cpp
parent1d16b34c14a3b2deff084757f2b583d54b4741ce (diff)
downloadmana-c3370ee4b57d18a62510240f105791ca3b403224.tar.gz
mana-c3370ee4b57d18a62510240f105791ca3b403224.tar.bz2
mana-c3370ee4b57d18a62510240f105791ca3b403224.tar.xz
mana-c3370ee4b57d18a62510240f105791ca3b403224.zip
Disable showing of IP addresses while taking a screenshot
This could potentially leak confidential information. Reviewed-by: cody
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp15
1 files changed, 15 insertions, 0 deletions
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;