]> git.pond.sub.org Git - empserver/commitdiff
(opt_UPDATESCHED): Remove nooption UPDATESCHED. It had no effect on
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2005 13:38:57 +0000 (13:38 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2005 13:38:57 +0000 (13:38 +0000)
the actual update, only on the update command.  Believed to be broken
since Empire2.

include/econfig-spec.h
info/Options.t
src/lib/commands/upda.c
src/lib/global/options.c

index 4c5e97a1a40cb9cb0a398f123ccc330a1f4a0e92..643c0d5b05c012be28fc4e1ebb7238325ed81d14 100644 (file)
@@ -177,8 +177,6 @@ EMPCF_OPT("TRADESHIPS", opt_TRADESHIPS,
     "Enable Tradeships")
 EMPCF_OPT("TREATIES", opt_TREATIES,
     "Allow treaties")
-EMPCF_OPT("UPDATESCHED", opt_UPDATESCHED,
-    "Used to control update times and should always be used")
 
 EMPCF_COMMENT("\n\n### Countries")
 EMPCFBOTH("btu_build_rate", btu_build_rate, float, NSC_FLOAT, 0,
index 273037e267732147e34da4a9de1653a0a9201d31..d05e6b73a3172fcb29f348ced55eba495e46df1e 100644 (file)
@@ -8,7 +8,6 @@ SHOWPLANE:      planes/units on ships/units up for trade are shown
 PINPOINT(etc): Missile exist which target ships instead of sectors
 SAIL:          another way to automatically move ships (may also be buggy)
 DEMANDUPDATE:  updates may be allowed on player demand
-UPDATESCHED:   updates can be controlled by the 'hours' file. NITP
 
 The following options were introduced in the Chainsaw server:
 
index 758304c53e1fa57522e67b8db99ffb95b0e91a28..3faa256deca37e3631e67b6cab5db226cd019b89 100644 (file)
@@ -52,6 +52,7 @@ upda(void)
 {
     FILE *fp;
     struct mob_acc_globals timestamps;
+    time_t now, next, delta;
 
     if (opt_MOB_ACCESS) {
        if ((fp = fopen(timestampfil, "rb")) == NULL)
@@ -69,103 +70,82 @@ upda(void)
            }
        }
     }
-    if (opt_UPDATESCHED) {
-       time_t now, next, delta;
 
-       if (updates_disabled())
-           pr("UPDATES ARE DISABLED!\n");
+    if (updates_disabled())
+       pr("UPDATES ARE DISABLED!\n");
 
-       (void)time(&now);
-       switch (update_policy) {
-       case UDP_NORMAL:
-           next_update_time(&now, &next, &delta);
-           pr("\nUpdates occur at times specified by the ETU rates.\n\n");
-           pr("The next update is at %19.19s.\n", ctime(&next));
-           break;
-       case UDP_TIMES:
-           next_update_time(&now, &next, &delta);
-           pr("\nUpdates occur at scheduled times.\n\n");
-           pr("The next update is at %19.19s.\n", ctime(&next));
-           break;
-       case UDP_BLITZ:
-           next_update_time(&now, &next, &delta);
-           pr("\nBlitz Updates occur every %d minutes. \n\n", blitz_time);
-           pr("The next update is at %19.19s.\n", ctime(&next));
-           break;
-       case UDP_NOREG:
-           pr("There are no regularly scheduled updates.\n");
-           break;
-       default:
-           pr("Update policy is inconsistent.\n");
-       }
-       pr("The current time is   %19.19s.\n\n", ctime(&now));
+    (void)time(&now);
+    switch (update_policy) {
+    case UDP_NORMAL:
+       next_update_time(&now, &next, &delta);
+       pr("\nUpdates occur at times specified by the ETU rates.\n\n");
+       pr("The next update is at %19.19s.\n", ctime(&next));
+       break;
+    case UDP_TIMES:
+       next_update_time(&now, &next, &delta);
+       pr("\nUpdates occur at scheduled times.\n\n");
+       pr("The next update is at %19.19s.\n", ctime(&next));
+       break;
+    case UDP_BLITZ:
+       next_update_time(&now, &next, &delta);
+       pr("\nBlitz Updates occur every %d minutes. \n\n", blitz_time);
+       pr("The next update is at %19.19s.\n", ctime(&next));
+       break;
+    case UDP_NOREG:
+       pr("There are no regularly scheduled updates.\n");
+       break;
+    default:
+       pr("Update policy is inconsistent.\n");
+    }
+    pr("The current time is   %19.19s.\n\n", ctime(&now));
 
-       if (update_window) {
-           now = update_time - update_window;
-           next_update_time(&now, &next, &delta);
-           pr("The next update window starts at %19.19s.\n",
-              ctime(&next));
-           next += update_window;
-           pr("The next update window stops at %19.19s.\n", ctime(&next));
-       }
-       if (opt_DEMANDUPDATE) {
-           if (update_demandpolicy != UDDEM_DISABLE) {
-               switch (update_demandpolicy) {
-               case UDDEM_TMCHECK:
-                   next_update_check_time(&now, &next, &delta);
-                   pr("Demand updates occur at update CHECK times.\n");
-                   pr("The next update check is at %19.19s.\n",
-                      ctime(&next));
-                   break;
-               case UDDEM_COMSET:
-                   pr("Demand updates occur right after the demand is set.\n");
-                   break;
-               default:
-                   pr("Update demand policy is inconsistent.\n");
-               }
+    if (update_window) {
+       now = update_time - update_window;
+       next_update_time(&now, &next, &delta);
+       pr("The next update window starts at %19.19s.\n",
+          ctime(&next));
+       next += update_window;
+       pr("The next update window stops at %19.19s.\n", ctime(&next));
+    }
+    if (opt_DEMANDUPDATE) {
+       if (update_demandpolicy != UDDEM_DISABLE) {
+           switch (update_demandpolicy) {
+           case UDDEM_TMCHECK:
+               next_update_check_time(&now, &next, &delta);
+               pr("Demand updates occur at update CHECK times.\n");
+               pr("The next update check is at %19.19s.\n",
+                  ctime(&next));
+               break;
+           case UDDEM_COMSET:
+               pr("Demand updates occur right after the demand is set.\n");
+               break;
+           default:
+               pr("Update demand policy is inconsistent.\n");
            }
        }
+    }
 
-       if ((update_policy == UDP_TIMES) ||
-           ((update_demandpolicy == UDDEM_TMCHECK) && opt_DEMANDUPDATE)) {
-           if (*update_times != 0)
-               pr("The update schedule is: %s\n", update_times);
-       }
-       if (opt_DEMANDUPDATE) {
-           if (update_demandpolicy != UDDEM_DISABLE) {
-               if (*update_demandtimes != 0)
-                   pr("Demand updates are allowed during: %s\n",
-                      update_demandtimes);
-               if (update_wantmin == 0) {
-                   pr("Demand updates are disabled by a mininum of 0\n");
-               } else {
-                   pr("Demand updates require %d country(s) to want one.\n", update_wantmin);
-               }
+    if ((update_policy == UDP_TIMES) ||
+       ((update_demandpolicy == UDDEM_TMCHECK) && opt_DEMANDUPDATE)) {
+       if (*update_times != 0)
+           pr("The update schedule is: %s\n", update_times);
+    }
+    if (opt_DEMANDUPDATE) {
+       if (update_demandpolicy != UDDEM_DISABLE) {
+           if (*update_demandtimes != 0)
+               pr("Demand updates are allowed during: %s\n",
+                  update_demandtimes);
+           if (update_wantmin == 0) {
+               pr("Demand updates are disabled by a mininum of 0\n");
+           } else {
+               pr("Demand updates require %d country(s) to want one.\n", update_wantmin);
            }
        }
-       if (*game_days != 0)
-           pr("Game days are: %s\n", game_days);
-       if (*game_hours != 0)
-           pr("Game hours are: %s\n", game_hours);
-
-       return 0;
-    } else {
-       time_t now;
-       time_t upd_time;
-       time_t next_update;
-       int secs_per_update;
-       int delta;
-
-       (void)time(&now);
-       upd_time = now + adj_update;
-       secs_per_update = etu_per_update * s_p_etu;
-       delta = secs_per_update - (upd_time % secs_per_update);
-       next_update = now + delta;
-       pr("The next update is at %19.19s.\n", ctime(&next_update));
-       pr("The current time is %19.19s.\n", ctime(&now));
-       if (update_window) {
-           pr("Update times are variable, update window is +/- %d minutes %d seconds.\n", update_window / 60, update_window % 60);
-       }
-       return 0;
     }
+    if (*game_days != 0)
+       pr("Game days are: %s\n", game_days);
+    if (*game_hours != 0)
+       pr("Game hours are: %s\n", game_hours);
+
+    return 0;
 }
index d738efe6030d4be114379bc2a09d144fdf59eb83..3faf7dbaf47670de0f2af64bb6f7d6e146b194f6 100644 (file)
@@ -69,4 +69,3 @@ int opt_SUPER_BARS = 0;
 int opt_TECH_POP = 0;
 int opt_TRADESHIPS = 0;
 int opt_TREATIES = 1;
-int opt_UPDATESCHED = 1;