(natstr): Member nat_connected is inappropriate, because it is

transient server state, not persistent game state.  Remove.
(player_main, edit): Remove uses.
(coun): Use getplayer() instead of nat_connected.  Delete the message
on command being out of order.
This commit is contained in:
Markus Armbruster 2005-10-02 17:01:15 +00:00
parent ed5ba9fe3e
commit 4f1ebae4b7
6 changed files with 5 additions and 20 deletions

View file

@ -71,7 +71,6 @@ struct natstr {
coord nat_xcap, nat_ycap; /* cap location in abs coords */ coord nat_xcap, nat_ycap; /* cap location in abs coords */
coord nat_xorg, nat_yorg; /* origin location in abs coords */ coord nat_xorg, nat_yorg; /* origin location in abs coords */
s_char nat_dayno; /* day of the year mod 128 */ s_char nat_dayno; /* day of the year mod 128 */
s_char nat_connected; /* connected or not? */
s_char nat_update; /* Want an update or not. */ s_char nat_update; /* Want an update or not. */
u_char nat_missed; /* How many updates missed */ u_char nat_missed; /* How many updates missed */
u_short nat_tgms; /* # of telegrams to be announced */ u_short nat_tgms; /* # of telegrams to be announced */

View file

@ -1,19 +1,11 @@
.TH Command COUNTRY .TH Command COUNTRY
.NA country "Find out information about deity countries" .NA country "Find out country status"
.LV Expert .LV Expert
.SY "country <NATS>" .SY "country <NATS>"
The country command displays status of the countries you specify.
The country command is temporarily out of order.
Please use the 'players' command instead.
The country command displays a list of the countries you specify,
their numb, their last access time, their btu's, and their status.
.s1 .s1
If you are \*QNOT\*U a deity, the country command will report on only Unless you are a deity, the country command will report only on
deity countries. (So that you can see if a deity is logged on) deity countries.
Deity countries get the full report. Note that "Now logged on" is
often incorrect, and deities are recommended to use the new command
"players" to list players currently logged on.
.s1 .s1
.EX country * .EX country *
.NF .NF

View file

@ -203,7 +203,6 @@ add(void)
*natp->nat_hostname = '\0'; *natp->nat_hostname = '\0';
*natp->nat_userid = '\0'; *natp->nat_userid = '\0';
natp->nat_btu = 0; natp->nat_btu = 0;
natp->nat_connected = 0;
natp->nat_reserve = 0; natp->nat_reserve = 0;
natp->nat_tgms = 0; natp->nat_tgms = 0;
natp->nat_ystart = 0; natp->nat_ystart = 0;

View file

@ -52,8 +52,6 @@ coun(void)
struct natstr nat; struct natstr nat;
int first; int first;
pr("The 'country' command is temporarily out of order.\n");
pr("Please use the 'players' command instead.\n");
if (!snxtitem(&ni, EF_NATION, player->argp[1])) if (!snxtitem(&ni, EF_NATION, player->argp[1]))
return RET_SYN; return RET_SYN;
first = 1; first = 1;
@ -84,7 +82,7 @@ coun_list(natid cn, struct natstr *natp)
s_char *status; s_char *status;
struct sctstr sect; struct sctstr sect;
if (natp->nat_connected) if (getplayer(cn))
pr("%3d %-16.16s [%d]", cn, " Now logged on", natp->nat_btu); pr("%3d %-16.16s [%d]", cn, " Now logged on", natp->nat_btu);
else else
pr("%3d %-16.16s [%d]", cn, ctime(&natp->nat_last_login), pr("%3d %-16.16s [%d]", cn, ctime(&natp->nat_last_login),

View file

@ -314,7 +314,6 @@ prnat(natid n)
return; return;
pr("Country #: %2d\n", n); pr("Country #: %2d\n", n);
pr("Name <n>: %-20s\t", np->nat_cnam); pr("Name <n>: %-20s\t", np->nat_cnam);
pr("Connected: %d\n", np->nat_connected);
pr("Representative <r>: %-20s\n", np->nat_pnam); pr("Representative <r>: %-20s\n", np->nat_pnam);
pr("BTUs <b>: %3d\t\t\t", np->nat_btu); pr("BTUs <b>: %3d\t\t\t", np->nat_btu);
pr("Reserves <m>: %5ld\n", np->nat_reserve); pr("Reserves <m>: %5ld\n", np->nat_reserve);

View file

@ -123,7 +123,6 @@ player_main(struct player *p)
strcpy(natp->nat_hostaddr, player->hostaddr); strcpy(natp->nat_hostaddr, player->hostaddr);
time(&natp->nat_last_login); time(&natp->nat_last_login);
natp->nat_connected = 1;
putnat(natp); putnat(natp);
if (natp->nat_flags & NF_INFORM && natp->nat_tgms > 0) { if (natp->nat_flags & NF_INFORM && natp->nat_tgms > 0) {
if (natp->nat_tgms == 1) if (natp->nat_tgms == 1)
@ -152,7 +151,6 @@ player_main(struct player *p)
secs = secs % 60; secs = secs % 60;
if (chance(secs / 60.0)) if (chance(secs / 60.0))
natp->nat_minused += 1; natp->nat_minused += 1;
natp->nat_connected = 0;
putnat(natp); putnat(natp);
pr("Bye-bye\n"); pr("Bye-bye\n");
} }