Tweaks, changes, and bugfixes

This commit is contained in:
2020-05-04 23:09:39 -04:00
parent cc443704f8
commit c980235726
5 changed files with 94 additions and 10 deletions

View File

@ -32,9 +32,25 @@ void * console_logic(void *)
{
game_is_running = false;
}
else if (input_string.length() > 2 && input_string.substr(0,3) == "say")
{
if(input_string.length() > 4)
{
gameserver::BroadcastMessage("Server: " + input_string.substr(4));
}
else
{
std::cout << "Must pass a valid message!" << std::endl;
}
}
else
{
std::cout << "Invalid console command!" << std::endl;
std::cout << std::endl
<< "Invalid console command!" << std::endl
<< "Valid commands are:" << std::endl
<< "stop" << std::endl
<< "say [message]" << std::endl;
}
}
}