limit name length in MP games to 18 characters
This commit is contained in:
parent
3d5b2edcbc
commit
5f91485eb6
2 changed files with 11 additions and 3 deletions
|
@ -87,6 +87,7 @@ SVN trunk (1.1+svn):
|
|||
* backport latest SDL_ttf change, fix ascender/descender issue for DejaVu
|
||||
* fix crash when using zoom keys in the main lobby
|
||||
* new utils: codecomp codeextract codeglyphs codelist, for font analysis
|
||||
* login names in MP is now limited to 18 characters
|
||||
|
||||
Version 1.1:
|
||||
* campaign server
|
||||
|
|
13
src/game.cpp
13
src/game.cpp
|
@ -1136,12 +1136,19 @@ bool game_controller::play_multiplayer()
|
|||
|
||||
std::string login = preferences::login();
|
||||
|
||||
int res = gui::show_dialog(disp(), NULL, _("Multiplayer"), "",
|
||||
gui::OK_CANCEL, &host_or_join, NULL,
|
||||
_("Login: "), &login);
|
||||
int res;
|
||||
do {
|
||||
res = gui::show_dialog(disp(), NULL, _("Multiplayer"), "",
|
||||
gui::OK_CANCEL, &host_or_join, NULL,
|
||||
_("Login: "), &login);
|
||||
if(login.size() > 18) {
|
||||
gui::show_error_message(disp(), _("The login name you chosed is too long, please use a login with less than 18 characters"));
|
||||
}
|
||||
}while(login.size() > 18) ;
|
||||
if (res < 0)
|
||||
return false;
|
||||
|
||||
|
||||
preferences::set_login(login);
|
||||
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue