(add): Initialize nat_last_login and nat_last_logout to zero rather
than current time. Nation addition time is irrelevant. (natstr): Document zero nat_last_login, nat_last_login mean never logged in/out. (player_main): Test nat_last_login zero instead of nat_hostaddr empty. (player_main): Assign nat_userid, nat_hostname, nat_hostaddr straight from player. The last connection's host is now shown as dotted quads instead of nowhere when the name isn't known. (natstr): Document that nat_userid, nat_hostname may be empty. (player_main): Simplify printing last connection address: nat_hostaddr can't be empty here; don't bother to substitute "nobody" for empty user.
This commit is contained in:
parent
95d2b48ee2
commit
f94f81ee16
3 changed files with 19 additions and 33 deletions
|
@ -65,8 +65,8 @@ struct natstr {
|
|||
char nat_cnam[20]; /* country name */
|
||||
char nat_pnam[20]; /* representative */
|
||||
char nat_hostaddr[32]; /* host addr of last user */
|
||||
char nat_hostname[512]; /* hostname of last user */
|
||||
char nat_userid[32]; /* userid of last user */
|
||||
char nat_hostname[512]; /* hostname of last user, may be empty */
|
||||
char nat_userid[32]; /* userid of last user, may be empty */
|
||||
coord nat_xstart, nat_ystart; /* cap location at start */
|
||||
coord nat_xcap, nat_ycap; /* cap location in abs coords */
|
||||
coord nat_xorg, nat_yorg; /* origin location in abs coords */
|
||||
|
@ -79,8 +79,8 @@ struct natstr {
|
|||
short nat_btu; /* bureaucratic time units */
|
||||
long nat_reserve; /* military reserves */
|
||||
long nat_money; /* moola */
|
||||
time_t nat_last_login; /* time of last login */
|
||||
time_t nat_last_logout; /* time of last logout */
|
||||
time_t nat_last_login; /* time of last login, 0 menas never */
|
||||
time_t nat_last_logout; /* time of last logout, 0 means never */
|
||||
time_t nat_newstim; /* date news last read */
|
||||
time_t nat_annotim; /* date annos last read */
|
||||
float nat_level[4]; /* technology, etc */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue