summaryrefslogtreecommitdiffstats
path: root/src/Server.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-01-07 17:41:13 +0100
committerMattes D <github@xoft.cz>2014-01-07 17:41:13 +0100
commita87daa969e01ee3f27048ced3864c82c4e80af22 (patch)
tree5f58b341730fba9e456e7ae8d456f5de53b7aedd /src/Server.cpp
parentDisabled an unneeded MSVC warning. (diff)
parentAvoid making copies of favicon string (diff)
downloadcuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar.gz
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar.bz2
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar.lz
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar.xz
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.tar.zst
cuberite-a87daa969e01ee3f27048ced3864c82c4e80af22.zip
Diffstat (limited to 'src/Server.cpp')
-rw-r--r--src/Server.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Server.cpp b/src/Server.cpp
index e707235a8..b0439391c 100644
--- a/src/Server.cpp
+++ b/src/Server.cpp
@@ -203,6 +203,11 @@ bool cServer::InitServer(cIniFile & a_SettingsIni)
m_PlayerCount = 0;
m_PlayerCountDiff = 0;
+ if (cFile::Exists("favicon.png"))
+ {
+ m_FaviconData = Base64Encode(cFile::ReadWholeFile("favicon.png"));
+ }
+
if (m_bIsConnected)
{
LOGERROR("ERROR: Trying to initialize server while server is already running!");
@@ -289,6 +294,15 @@ int cServer::GetNumPlayers(void)
+const AString & cServer::GetFaviconData(void) const
+{
+ return m_FaviconData;
+}
+
+
+
+
+
void cServer::PrepareKeys(void)
{
// TODO: Save and load key for persistence across sessions