NetPlay: Limit nickname length

Ridiculously long nicknames cause UI silliness, so 30 characters seems
like a reasonable limit, as it's the same as the forum.
This commit is contained in:
Techjar
2018-11-21 00:15:44 -05:00
parent 92812d0b0b
commit 037aa2192f
6 changed files with 24 additions and 4 deletions

View File

@ -252,6 +252,9 @@ bool NetPlayClient::Connect()
case CON_ERR_GAME_RUNNING:
m_dialog->OnConnectionError(_trans("The game is currently running."));
break;
case CON_ERR_NAME_TOO_LONG:
m_dialog->OnConnectionError(_trans("Nickname is too long."));
break;
default:
m_dialog->OnConnectionError(_trans("The server sent an unknown error message."));
break;