diff --git a/src/game/client/components/motd.cpp b/src/game/client/components/motd.cpp index 76203c471..d9b45446b 100644 --- a/src/game/client/components/motd.cpp +++ b/src/game/client/components/motd.cpp @@ -61,6 +61,7 @@ void CMotd::OnMessage(int MsgType, void *pRawMsg) { CNetMsg_Sv_Motd *pMsg = (CNetMsg_Sv_Motd *)pRawMsg; + char* pLast = m_aServerMotd; // process escaping str_copy(m_aServerMotd, pMsg->m_pMessage, sizeof(m_aServerMotd)); for(int i = 0; m_aServerMotd[i]; i++) @@ -69,12 +70,16 @@ void CMotd::OnMessage(int MsgType, void *pRawMsg) { if(m_aServerMotd[i+1] == 'n') { + m_aServerMotd[i] = '\0'; + m_pClient->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "motd", pLast, true); m_aServerMotd[i] = ' '; m_aServerMotd[i+1] = '\n'; i++; + pLast = m_aServerMotd+i+1; } } } + m_pClient->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "motd", pLast, true); if(m_aServerMotd[0] && g_Config.m_ClMotdTime) m_ServerMotdTime = time_get()+time_freq()*g_Config.m_ClMotdTime;