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.
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 */
.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
*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;
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;
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),
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);
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)
secs = secs % 60;
if (chance(secs / 60.0))
natp->nat_minused += 1;
- natp->nat_connected = 0;
putnat(natp);
pr("Bye-bye\n");
}