(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:
parent
ed5ba9fe3e
commit
4f1ebae4b7
6 changed files with 5 additions and 20 deletions
|
@ -71,7 +71,6 @@ struct natstr {
|
|||
coord nat_xcap, nat_ycap; /* cap 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_connected; /* connected or not? */
|
||||
s_char nat_update; /* Want an update or not. */
|
||||
u_char nat_missed; /* How many updates missed */
|
||||
u_short nat_tgms; /* # of telegrams to be announced */
|
||||
|
|
|
@ -1,19 +1,11 @@
|
|||
.TH Command COUNTRY
|
||||
.NA country "Find out information about deity countries"
|
||||
.NA country "Find out country status"
|
||||
.LV Expert
|
||||
.SY "country <NATS>"
|
||||
|
||||
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.
|
||||
The country command displays status of the countries you specify.
|
||||
.s1
|
||||
If you are \*QNOT\*U a deity, the country command will report on only
|
||||
deity countries. (So that you can see if a deity is logged on)
|
||||
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.
|
||||
Unless you are a deity, the country command will report only on
|
||||
deity countries.
|
||||
.s1
|
||||
.EX country *
|
||||
.NF
|
||||
|
|
|
@ -203,7 +203,6 @@ add(void)
|
|||
*natp->nat_hostname = '\0';
|
||||
*natp->nat_userid = '\0';
|
||||
natp->nat_btu = 0;
|
||||
natp->nat_connected = 0;
|
||||
natp->nat_reserve = 0;
|
||||
natp->nat_tgms = 0;
|
||||
natp->nat_ystart = 0;
|
||||
|
|
|
@ -52,8 +52,6 @@ coun(void)
|
|||
struct natstr nat;
|
||||
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]))
|
||||
return RET_SYN;
|
||||
first = 1;
|
||||
|
@ -84,7 +82,7 @@ coun_list(natid cn, struct natstr *natp)
|
|||
s_char *status;
|
||||
struct sctstr sect;
|
||||
|
||||
if (natp->nat_connected)
|
||||
if (getplayer(cn))
|
||||
pr("%3d %-16.16s [%d]", cn, " Now logged on", natp->nat_btu);
|
||||
else
|
||||
pr("%3d %-16.16s [%d]", cn, ctime(&natp->nat_last_login),
|
||||
|
|
|
@ -314,7 +314,6 @@ prnat(natid n)
|
|||
return;
|
||||
pr("Country #: %2d\n", n);
|
||||
pr("Name <n>: %-20s\t", np->nat_cnam);
|
||||
pr("Connected: %d\n", np->nat_connected);
|
||||
pr("Representative <r>: %-20s\n", np->nat_pnam);
|
||||
pr("BTUs <b>: %3d\t\t\t", np->nat_btu);
|
||||
pr("Reserves <m>: %5ld\n", np->nat_reserve);
|
||||
|
|
|
@ -123,7 +123,6 @@ player_main(struct player *p)
|
|||
strcpy(natp->nat_hostaddr, player->hostaddr);
|
||||
|
||||
time(&natp->nat_last_login);
|
||||
natp->nat_connected = 1;
|
||||
putnat(natp);
|
||||
if (natp->nat_flags & NF_INFORM && natp->nat_tgms > 0) {
|
||||
if (natp->nat_tgms == 1)
|
||||
|
@ -152,7 +151,6 @@ player_main(struct player *p)
|
|||
secs = secs % 60;
|
||||
if (chance(secs / 60.0))
|
||||
natp->nat_minused += 1;
|
||||
natp->nat_connected = 0;
|
||||
putnat(natp);
|
||||
pr("Bye-bye\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue