]> git.pond.sub.org Git - empserver/commitdiff
(natstr): Member nat_connected is inappropriate, because it is
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 2 Oct 2005 17:01:15 +0000 (17:01 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 2 Oct 2005 17:01:15 +0000 (17:01 +0000)
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.

include/nat.h
info/Commands/country.t
src/lib/commands/add.c
src/lib/commands/coun.c
src/lib/commands/edit.c
src/lib/player/player.c

index d1bae7eb65db7e919fe2e2ca1d47aebc5113baa4..4530af9180da0f055db862fb32e056b1c821c2e8 100644 (file)
@@ -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 */
     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 */
     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 */
index 9d35f7c77e9aa7e2eb039c0adff7fa34389e9d48..ea30fd3838bcef449431f63358437d1c099e5f95 100644 (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
 .SY "country <NATS>"
 .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
 .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
 .s1
 .EX country *
 .NF
index aa2df5c7d16a03c0cd6437f88ee5e7a04fcaa609..0f6bd15e482a8de4f97c32cef34db1e90a553514 100644 (file)
@@ -203,7 +203,6 @@ add(void)
        *natp->nat_hostname = '\0';
        *natp->nat_userid = '\0';
        natp->nat_btu = 0;
        *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;
        natp->nat_reserve = 0;
        natp->nat_tgms = 0;
        natp->nat_ystart = 0;
index 96f643f8e3debd06e4d5877826d4226dc644e65c..c83e43673e9bcd806ea5a095363cdb1385a146bb 100644 (file)
@@ -52,8 +52,6 @@ coun(void)
     struct natstr nat;
     int first;
 
     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;
     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;
 
     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),
        pr("%3d  %-16.16s   [%d]", cn, " Now logged on", natp->nat_btu);
     else
        pr("%3d  %-16.16s   [%d]", cn, ctime(&natp->nat_last_login),
index f77572502f1e7d3513d86487fb3bd065a815213b..6a111896f2bb0cc35028c4f6f550bcb493ba8d68 100644 (file)
@@ -314,7 +314,6 @@ prnat(natid n)
        return;
     pr("Country #: %2d\n", n);
     pr("Name <n>: %-20s\t", np->nat_cnam);
        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);
     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);
index 034ed7b433e5d9bf6dbd865a845af367b4c95029..aef6cd8c4799054b15ff83e0d61e2b2268a733bc 100644 (file)
@@ -123,7 +123,6 @@ player_main(struct player *p)
        strcpy(natp->nat_hostaddr, player->hostaddr);
 
     time(&natp->nat_last_login);
        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)
     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;
     secs = secs % 60;
     if (chance(secs / 60.0))
        natp->nat_minused += 1;
-    natp->nat_connected = 0;
     putnat(natp);
     pr("Bye-bye\n");
 }
     putnat(natp);
     pr("Bye-bye\n");
 }