Handle linebreaking from motd if needed
This commit is contained in:
parent
28511c597e
commit
0c7475c6cf
@ -636,9 +636,13 @@ void ClientLobby::handleServerInfo(Event* event)
|
|||||||
// MOTD
|
// MOTD
|
||||||
core::stringw motd;
|
core::stringw motd;
|
||||||
data.decodeString16(&motd);
|
data.decodeString16(&motd);
|
||||||
if (!motd.empty())
|
const std::vector<core::stringw>& motd_line = StringUtils::split(motd,
|
||||||
|
'\n');
|
||||||
|
if (!motd_line.empty())
|
||||||
|
{
|
||||||
|
for (const core::stringw& motd : motd_line)
|
||||||
NetworkingLobby::getInstance()->addMoreServerInfo(motd);
|
NetworkingLobby::getInstance()->addMoreServerInfo(motd);
|
||||||
|
}
|
||||||
} // handleServerInfo
|
} // handleServerInfo
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user