diff --git a/src/gmtool.c b/src/gmtool.c index 24c1735e8..a07feab43 100644 --- a/src/gmtool.c +++ b/src/gmtool.c @@ -886,8 +886,20 @@ static void seed_player(state *st, const newfaction *player) { pnormalize(&nx, &ny, st->cursor.pl); r = findregion(nx, ny); if (r) { - addplayer(r, addfaction(player->email, player->password, player->race, - player->lang, player->subscription)); + const char *at = strchr(player->email, '@'); + faction *f; + addplayer(r, f = addfaction(player->email, player->password, + player->race, player->lang, + player->subscription)); + if (at) { + char fname[64]; + size_t len = at - player->email; + if (len>4 && lenemail, len); + fname[len]=0; + faction_setname(f, fname); + } + } } } }