1
0

Implement favicon for 1.7.2

Favicon data is a png encoded in base64 which is stored in the server
and sent in the server response packet
This commit is contained in:
Bill Derouin
2014-01-07 09:31:06 -06:00
parent db978fc687
commit 913841f501
4 changed files with 28 additions and 0 deletions

View File

@@ -203,6 +203,8 @@ bool cServer::InitServer(cIniFile & a_SettingsIni)
m_PlayerCount = 0;
m_PlayerCountDiff = 0;
if (cFile::Exists("favicon.png")) m_Favicon = Base64Encode(cFile::ReadWholeFile("favicon.png"));
if (m_bIsConnected)
{
LOGERROR("ERROR: Trying to initialize server while server is already running!");
@@ -289,6 +291,15 @@ int cServer::GetNumPlayers(void)
AString cServer::GetFaviconData(void)
{
return m_Favicon;
}
void cServer::PrepareKeys(void)
{
// TODO: Save and load key for persistence across sessions