Don't print ASCII art when using ncurses

This commit is contained in:
sfan5 2023-10-08 23:00:49 +02:00
parent 11ec75c2ad
commit b270c2bd68

@ -540,13 +540,22 @@ void Server::start()
m_thread->start(); m_thread->start();
// ASCII art for the win! // ASCII art for the win!
std::cerr const char *art[] = {
<< " __. __. __. " << std::endl " __. __. __. ",
<< " _____ |__| ____ _____ / |_ _____ _____ / |_ " << std::endl " _____ |__| ____ _____ / |_ _____ _____ / |_ ",
<< " / \\| |/ \\ / __ \\ _\\/ __ \\/ __> _\\" << std::endl " / \\| |/ \\ / __ \\ _\\/ __ \\/ __> _\\",
<< "| Y Y \\ | | \\ ___/| | | ___/\\___ \\| | " << std::endl "| Y Y \\ | | \\ ___/| | | ___/\\___ \\| | ",
<< "|__|_| / |___| /\\______> | \\______>_____/| | " << std::endl "|__|_| / |___| /\\______> | \\______>_____/| | ",
<< " \\/ \\/ \\/ \\/ \\/ " << std::endl; " \\/ \\/ \\/ \\/ \\/ "
};
if (!m_admin_chat) {
// we're not printing to rawstream to avoid it showing up in the logs.
// however it would then mess up the ncurses terminal (m_admin_chat),
// so we skip it in that case.
for (auto line : art)
std::cerr << line << std::endl;
}
actionstream << "World at [" << m_path_world << "]" << std::endl; actionstream << "World at [" << m_path_world << "]" << std::endl;
actionstream << "Server for gameid=\"" << m_gamespec.id actionstream << "Server for gameid=\"" << m_gamespec.id
<< "\" listening on "; << "\" listening on ";