2 load/unload local variables
4 Copyright (C) Andrew Tridgell 2002
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., 675 Mass Ave, Cambridge, MA 02139, USA.
23 static void variable_reload(void)
25 if (config_open() != 0) {
26 d_printf("CHESSD: config database open failed\n");
39 /* initialise variables that can be re-initialised on code reload */
40 void initial_load(void)
42 command_globals.startuptime = time(0);
44 seek_globals.quota_time = 60;
45 command_globals.player_high = 0;
46 command_globals.game_high = 0;
47 srandom(command_globals.startuptime);
51 /* initialise variables that can be re-initialised on code reload */
52 void reload_open(void)
54 load_all_globals("globals.dat");
59 /* initialise variables that can be re-initialised on code reload */
60 void reload_close(void)
66 save_all_globals("globals.dat");