Skip to content

Commit

Permalink
No longer auto-generate a 'guest####' player name when name is empty
Browse files Browse the repository at this point in the history
You can't join most servers with a 'guest####' player name anyway so
it's only logical to remove them.
  • Loading branch information
red-001 authored and paramat committed Feb 9, 2017
1 parent 607dab2 commit e2ad76f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/client/clientlauncher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,12 @@ bool ClientLauncher::launch_game(std::string &error_message,
return false;
}

if (menudata.name == "")
menudata.name = std::string("Guest") + itos(myrand_range(1000, 9999));
else
playername = menudata.name;
if (menudata.name == "" && !simple_singleplayer_mode) {
error_message = gettext("Please choose a name!");
return false;
}

playername = menudata.name;
password = menudata.password;

g_settings->set("name", playername);
Expand Down

0 comments on commit e2ad76f

Please sign in to comment.