summaryrefslogtreecommitdiffstats
path: root/src/client/net/serverconnection.cpp
diff options
context:
space:
mode:
authorChristian Klinger2016-09-26 14:33:01 +0200
committerChristian Klinger2016-09-26 14:33:01 +0200
commit024212d9ebcb9bba74ceb4d318b60d9dbf3b5a42 (patch)
treec9646fcecb6a7626a461ee618a34e498814c285e /src/client/net/serverconnection.cpp
parentadded the --config=FILE parameter and got rid of the SETTINGS macro. (diff)
downloadpvs2-024212d9ebcb9bba74ceb4d318b60d9dbf3b5a42.tar.gz
pvs2-024212d9ebcb9bba74ceb4d318b60d9dbf3b5a42.tar.xz
pvs2-024212d9ebcb9bba74ceb4d318b60d9dbf3b5a42.zip
clients in exam-mode no longer send a screenshot. Also some refactoring.
Diffstat (limited to 'src/client/net/serverconnection.cpp')
-rw-r--r--src/client/net/serverconnection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/net/serverconnection.cpp b/src/client/net/serverconnection.cpp
index 54d95bc..3ff16bf 100644
--- a/src/client/net/serverconnection.cpp
+++ b/src/client/net/serverconnection.cpp
@@ -15,6 +15,7 @@
#include "../../shared/util.h"
#include "../../shared/settings.h"
#include "../util/platform/blankscreen.h"
+#include "../clientapp/clientapp.h"
#define CHALLENGE_LEN 20
@@ -180,6 +181,10 @@ void ServerConnection::handleMsg()
// message THUMB - server requests screenshot as thumbnail
if (id == _THUMB)
{
+ if (clientApp->isExamMode()) {
+ qDebug() << "denied request for screenshot (exam mode)";
+ return;
+ }
int x = _fromServer.getFieldString(_X).toInt();
int y = _fromServer.getFieldString(_Y).toInt();
if (x < 32)