diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 12:15:19 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-01 12:15:19 +0100 |
commit | 3080bd8177126abed78a7d44ac1cf9dc1de1ebf7 (patch) | |
tree | e4793c0d3b24e5071f8197afef0b28db7f3a9209 /FICS | |
parent | a39e85ee3319ce779bebf1234ed3b671947cae18 (diff) |
Aligned assignments
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/fics_addplayer.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/FICS/fics_addplayer.c b/FICS/fics_addplayer.c index a711396..4514478 100644 --- a/FICS/fics_addplayer.c +++ b/FICS/fics_addplayer.c @@ -109,11 +109,10 @@ main(int argc, char *argv[]) if (!player_read(p, funame)) errx(1, "%s already exists.", funame); - parray[p].name = xstrdup(funame); - parray[p].login = xstrdup(funame); - stolower(parray[p].login); - parray[p].fullName = xstrdup(fname); - parray[p].emailAddress = xstrdup(email); + parray[p].name = xstrdup(funame); + parray[p].login = stolower(xstrdup(funame)); + parray[p].fullName = xstrdup(fname); + parray[p].emailAddress = xstrdup(email); for (i = 0; i < PASSLEN; i++) password[i] = ('a' + arc4random_uniform(26)); @@ -122,10 +121,10 @@ main(int argc, char *argv[]) if (strlcpy(salt, fics_getsalt(), sizeof salt) >= sizeof salt) errx(1, "salt truncated"); - parray[p].passwd = xstrdup(crypt(password, salt)); - parray[p].registered = 1; -// parray[p].network_player = !local; - parray[p].rated = 1; + parray[p].passwd = xstrdup(crypt(password, salt)); + parray[p].registered = 1; + parray[p].rated = 1; + player_save(p); printf("Added player account: >%s< >%s< >%s< >%s<\n", |