2 * Empire - A multi-player, client/server Internet based war game.
3 * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
4 * Ken Stevens, Steve McClure
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * See files README, COPYING and CREDITS in the root of the source
23 * tree for related information and legal notices. It is expected
24 * that future projects/authors will amend these files as needed.
28 * upda.c: Give the time of the next update
30 * Known contributors to this file:
31 * Markus Armbruster, 2007
42 * Tell what the update policy is, and when the next update
48 time_t now, next, stop;
50 if (updates_disabled())
51 pr("UPDATES ARE DISABLED!\n");
54 next = update_time[0];
56 pr("\nUpdates occur at times specified by the ETU rates.\n\n");
57 pr("The next update is at %19.19s.\n", ctime(&next));
59 pr("There are no regularly scheduled updates.\n");
61 pr("The current time is %19.19s.\n\n", ctime(&now));
63 if (next && update_window) {
64 pr("The next update window starts at %19.19s.\n",
66 stop = next + update_window;
67 pr("The next update window stops at %19.19s.\n", ctime(&stop));
70 switch (update_demand) {
74 case UPD_DEMAND_SCHED:
75 pr("Demand updates occur at update CHECK times.\n");
77 pr("The next update check is at %19.19s.\n",
80 pr("Demand updates require %d country(s) to want one.\n",
83 case UPD_DEMAND_ASYNC:
84 pr("Demand updates occur right after the demand is set.\n");
85 if (*update_demandtimes != 0) {
86 pr("Demand updates are allowed during: %s\n",
89 pr("Demand updates require %d country(s) to want one.\n",
94 pr("Game days are: %s\n", game_days);
96 pr("Game hours are: %s\n", game_hours);
98 pr("\nThis command is obsolete and will go away in a future version.\n"
99 "Please use \"show updates\".\n");