douglasscherner
Member
- Joined
- Aug 15, 2014
- Messages
- 143
- Reaction score
- 24
I want to don't show castings live with password in first page at login when the password board is empty.
Because it's flood the cast page with not necessary casts.
Is possible hide and not show casts with * ?
Thank you.
Because it's flood the cast page with not necessary casts.
Lua:
const auto& casts = ProtocolGame::getLiveCasts();
output->addByte(casts.size());
for (const auto& cast : casts)
{
std::ostringstream entry;
entry << cast.first->getName() << " [" << cast.second->getSpectatorCount() << (cast.second->isPasswordProtected() ? "*]" : "]");
output->addString(entry.str());
entry.str(std::string());
output->addString("Level " + std::to_string(cast.first->getLevel()));
output->add<uint32_t>(serverIp);
output->add<uint16_t>(g_config.getNumber(ConfigManager::GAME_PORT));
}
output->add<uint16_t>(0);
send(std::move(output));
disconnect();
Is possible hide and not show casts with * ?
Thank you.