From 19327d7076b2cc75a23ed525eb633e51a11b548f Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 9 Jan 2011 20:50:58 +0000 Subject: [PATCH] Reset avatar if blacklisted (do not show error message yet). --- src/net/common/serverlobbythread.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 880b55bc..b0fe7b83 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1570,7 +1570,14 @@ void ServerLobbyThread::AvatarBlacklisted(unsigned playerId) { // TODO use proper error code. - SessionError(m_sessionManager.GetSessionByUniquePlayerId(playerId, true), ERR_NET_AVATAR_TOO_LARGE); + //SessionError(m_sessionManager.GetSessionByUniquePlayerId(playerId, true), ERR_NET_AVATAR_TOO_LARGE); + + SessionWrapper tmpSession = m_sessionManager.GetSessionByUniquePlayerId(playerId, true); + if (tmpSession.sessionData && tmpSession.playerData) + { + tmpSession.playerData->SetAvatarMD5(MD5Buf()); // Reset avatar if blacklisted. + InitAfterLogin(tmpSession); + } } void