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
|
||||
core::stringw motd;
|
||||
data.decodeString16(&motd);
|
||||
if (!motd.empty())
|
||||
NetworkingLobby::getInstance()->addMoreServerInfo(motd);
|
||||
|
||||
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);
|
||||
}
|
||||
} // handleServerInfo
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user