Freeciv-3.2: /fast/freeciv/nightly/S3_2/server/civserver.c Source File

Freeciv-3.2

Loading...
Searching...
No Matches
civserver.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18#include "fc_prehdrs.h"
19
20#include <stdio.h>
21#include <stdlib.h>
22#include <string.h>
23
24#ifdef HAVE_UNISTD_H
25#include <unistd.h>
26#endif
27
28#ifdef HAVE_SIGNAL_H
29#include <signal.h>
30#endif
31
32#ifdef GENERATING_MAC /* mac header(s) */
33#include <Controls.h>
34#include <Dialogs.h>
35#endif
36
37#ifdef FREECIV_MSWINDOWS
38#include <windows.h>
39#endif
40
41/* utility */
42#include "deprecations.h"
43#include "fc_cmdline.h"
44#include "fciconv.h"
45#include "fcintl.h"
46#include "log.h"
47#include "support.h"
48
49/* common */
50#include "capstr.h"
51#include "fc_cmdhelp.h"
52#include "game.h"
53#include "version.h"
54
55/* server */
56#include "aiiface.h"
57#include "console.h"
58#include "meta.h"
59#include "sernet.h"
60#include "srv_main.h"
61#include "srv_signal.h"
62
63#ifdef GENERATING_MAC
64static void Mac_options(int argc); /* don't need argv */
65#endif
66
67/**********************************************************************/
72 int main(int argc, char *argv[])
73{
74 int inx;
75 bool showhelp = FALSE;
76 bool showvers = FALSE;
77 char *option = NULL;
78
79 /* Load Windows post-crash debugger */
80#ifdef FREECIV_MSWINDOWS
81# ifndef FREECIV_NDEBUG
82 if (LoadLibrary("exchndl.dll") == NULL) {
83# ifdef FREECIV_DEBUG
84 fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
85# endif /* FREECIV_DEBUG */
86 }
87# endif /* FREECIV_NDEBUG */
88#endif /* FREECIV_MSWINDOWS */
89
90 setup_interrupt_handlers();
91
92 /* initialize server */
93 srv_init();
94
95 /* parse command-line arguments... */
96
97#ifdef GENERATING_MAC
98 Mac_options(argc);
99#endif
100 srvarg.announce = ANNOUNCE_DEFAULT;
101
102 game.server.meta_info.type[0] = '\0';
103
104 /* no we don't use GNU's getopt or even the "standard" getopt */
105 /* yes we do have reasons ;) */
106 /* FIXME: and that are? */
107 inx = 1;
108 while (inx < argc) {
109 if ((option = get_option_malloc("--file", argv, &inx, argc,
110 FALSE))) {
111 sz_strlcpy(srvarg.load_filename, option);
112 free(option);
113 } else if (is_option("--help", argv[inx])) {
114 showhelp = TRUE;
115 break;
116 } else if ((option = get_option_malloc("--log", argv, &inx, argc, TRUE))) {
117 srvarg.log_filename = option;
118#ifndef FREECIV_NDEBUG
119 } else if (is_option("--Fatal", argv[inx])) {
120 if (inx + 1 >= argc || '-' == argv[inx + 1][0]) {
121 srvarg.fatal_assertions = SIGABRT;
122 } else if (str_to_int(argv[inx + 1], &srvarg.fatal_assertions)) {
123 inx++;
124 } else {
125 fc_fprintf(stderr, _("Invalid signal number \"%s\".\n"),
126 argv[inx + 1]);
127 inx++;
128 showhelp = TRUE;
129 }
130#endif /* FREECIV_NDEBUG */
131 } else if ((option = get_option_malloc("--Ranklog", argv, &inx, argc, TRUE))) {
132 srvarg.ranklog_filename = option;
133 } else if (is_option("--keep", argv[inx])) {
134 srvarg.metaconnection_persistent = TRUE;
135 /* Implies --meta */
136 srvarg.metaserver_no_send = FALSE;
137 } else if (is_option("--nometa", argv[inx])) {
138 fc_fprintf(stderr, _("Warning: the %s option is obsolete. "
139 "Use -m to enable the metaserver.\n"), argv[inx]);
140 showhelp = TRUE;
141 } else if (is_option("--meta", argv[inx])) {
142 srvarg.metaserver_no_send = FALSE;
143 } else if ((option = get_option_malloc("--Metaserver",
144 argv, &inx, argc, FALSE))) {
145 sz_strlcpy(srvarg.metaserver_addr, option);
146 free(option);
147 srvarg.metaserver_no_send = FALSE; /* --Metaserver implies --meta */
148 } else if ((option = get_option_malloc("--identity",
149 argv, &inx, argc, FALSE))) {
150 sz_strlcpy(srvarg.identity_name, option);
151 free(option);
152 } else if ((option = get_option_malloc("--port", argv, &inx, argc, FALSE))) {
153 if (!str_to_int(option, &srvarg.port)) {
154 showhelp = TRUE;
155 break;
156 }
157 free(option);
158 } else if ((option = get_option_malloc("--bind", argv, &inx, argc, TRUE))) {
159 srvarg.bind_addr = option;
160 } else if ((option = get_option_malloc("--Bind-meta", argv, &inx, argc, TRUE))) {
161 srvarg.bind_meta_addr = option;
162#ifdef FREECIV_WEB
163 } else if ((option = get_option_malloc("--type", argv, &inx, argc, FALSE))) {
164 sz_strlcpy(game.server.meta_info.type, option);
165 free(option);
166#endif /* FREECIV_WEB */
167 } else if ((option = get_option_malloc("--read", argv, &inx, argc, TRUE)))
168 srvarg.script_filename = option;
169 else if ((option = get_option_malloc("--quitidle", argv, &inx, argc, FALSE))) {
170 if (!str_to_int(option, &srvarg.quitidle)) {
171 showhelp = TRUE;
172 break;
173 }
174 free(option);
175 } else if (is_option("--exit-on-end", argv[inx])) {
176 srvarg.exit_on_end = TRUE;
177 } else if ((option = get_option_malloc("--debug", argv, &inx, argc, FALSE))) {
178 if (!log_parse_level_str(option, &srvarg.loglevel)) {
179 showhelp = TRUE;
180 break;
181 }
182 free(option);
183#ifdef HAVE_FCDB
184 } else if ((option = get_option_malloc("--Database", argv, &inx, argc, FALSE))) {
185 /* Freed after file has been loaded - not here nor in server quit */
186 srvarg.fcdb_enabled = TRUE;
187 srvarg.fcdb_conf = option;
188 } else if (is_option("--auth", argv[inx])) {
189 srvarg.auth_enabled = TRUE;
190 } else if (is_option("--Guests", argv[inx])) {
191 srvarg.auth_allow_guests = TRUE;
192 } else if (is_option("--Newusers", argv[inx])) {
193 srvarg.auth_allow_newusers = TRUE;
194#endif /* HAVE_FCDB */
195 } else if ((option = get_option_malloc("--Serverid", argv, &inx, argc, FALSE))) {
196 sz_strlcpy(srvarg.serverid, option);
197 free(option);
198 } else if ((option = get_option_malloc("--saves", argv, &inx, argc, TRUE))) {
199 srvarg.saves_pathname = option;
200 } else if ((option = get_option_malloc("--scenarios", argv, &inx, argc, TRUE))) {
201 srvarg.scenarios_pathname = option;
202 } else if ((option = get_option_malloc("--ruleset", argv, &inx, argc, TRUE))) {
203 srvarg.ruleset = option;
204 } else if (is_option("--version", argv[inx])) {
205 showvers = TRUE;
206 } else if ((option = get_option_malloc("--Announce", argv, &inx, argc, FALSE))) {
207 if (!fc_strcasecmp(option, "ipv4")) {
208 srvarg.announce = ANNOUNCE_IPV4;
209 } else if (!fc_strcasecmp(option, "none")) {
210 srvarg.announce = ANNOUNCE_NONE;
211#ifdef FREECIV_IPV6_SUPPORT
212 } else if (!fc_strcasecmp(option, "ipv6")) {
213 srvarg.announce = ANNOUNCE_IPV6;
214#endif /* IPv6 support */
215 } else {
216 log_error(_("Illegal value \"%s\" for --Announce"), option);
217 }
218 free(option);
219 } else if (is_option("--warnings", argv[inx])) {
220 deprecation_warnings_enable();
221#ifdef AI_MODULES
222 } else if ((option = get_option_malloc("--LoadAI", argv, &inx, argc, FALSE))) {
223 if (!load_ai_module(option)) {
224 fc_fprintf(stderr, _("Failed to load AI module \"%s\"\n"), option);
225 exit(EXIT_FAILURE);
226 }
227 free(option);
228#endif /* AI_MODULES */
229 } else {
230 fc_fprintf(stderr, _("Error: unknown option '%s'\n"), argv[inx]);
231 showhelp = TRUE;
232 break;
233 }
234 inx++;
235 }
236
237 if (showvers && !showhelp) {
238 fc_fprintf(stderr, "%s \n", freeciv_name_version());
239 exit(EXIT_SUCCESS);
240 }
241 con_write(C_VERSION, _("This is the server for %s"), freeciv_name_version());
242 /* TRANS: No full stop after the URL, could cause confusion. */
243 con_write(C_COMMENT, _("You can learn a lot about Freeciv at %s"),
244 HOMEPAGE_URL);
245
246 if (showhelp) {
247 struct cmdhelp *help = cmdhelp_new(argv[0]);
248
249 cmdhelp_add(help, "A",
250 /* TRANS: "Announce" is exactly what user must type, do not translate. */
251 _("Announce PROTO"),
252 _("Announce game in LAN using protocol PROTO "
253 "(IPv4/IPv6/none)"));
254#ifdef HAVE_FCDB
255 cmdhelp_add(help, "D",
256 /* TRANS: "Database" is exactly what user must type, do not translate. */
257 _("Database FILE"),
258 _("Enable database connection with configuration from "
259 "FILE."));
260 cmdhelp_add(help, "a", "auth",
261 _("Enable server authentication (requires --Database)."));
262 cmdhelp_add(help, "G", "Guests",
263 _("Allow guests to login if auth is enabled."));
264 cmdhelp_add(help, "N", "Newusers",
265 _("Allow new users to login if auth is enabled."));
266#endif /* HAVE_FCDB */
267 cmdhelp_add(help, "b",
268 /* TRANS: "bind" is exactly what user must type, do not translate. */
269 _("bind ADDR"),
270 _("Listen for clients on ADDR"));
271 cmdhelp_add(help, "B", "Bind-meta ADDR",
272 _("Connect to metaserver from this address"));
273#ifdef FREECIV_DEBUG
274 cmdhelp_add(help, "d",
275 /* TRANS: "debug" is exactly what user must type, do not translate. */
276 _("debug LEVEL"),
277 _("Set debug log level (one of f,e,w,n,v,d, or "
278 "d:file1,min,max:...)"));
279#else /* FREECIV_DEBUG */
280 cmdhelp_add(help, "d",
281 /* TRANS: "debug" is exactly what user must type, do not translate. */
282 _("debug LEVEL"),
283 _("Set debug log level (one of f,e,w,n,v)"));
284#endif /* FREECIV_DEBUG */
285#ifndef FREECIV_NDEBUG
286 cmdhelp_add(help, "F",
287 /* TRANS: "Fatal" is exactly what user must type, do not translate. */
288 _("Fatal [SIGNAL]"),
289 _("Raise a signal on failed assertion"));
290#endif /* FREECIV_NDEBUG */
291 cmdhelp_add(help, "f",
292 /* TRANS: "file" is exactly what user must type, do not translate. */
293 _("file FILE"),
294 _("Load saved game FILE"));
295 cmdhelp_add(help, "h", "help",
296 _("Print a summary of the options"));
297 cmdhelp_add(help, "i",
298 /* TRANS: "identity" is exactly what user must type, do not translate. */
299 _("identity ADDR"),
300 _("Be known as ADDR at metaserver or LAN client"));
301 cmdhelp_add(help, "l",
302 /* TRANS: "log" is exactly what user must type, do not translate. */
303 _("log FILE"),
304 _("Use FILE as logfile"));
305 cmdhelp_add(help, "m", "meta",
306 _("Notify metaserver and send server's info"));
307 cmdhelp_add(help, "M",
308 /* TRANS: "Metaserver" is exactly what user must type, do not translate. */
309 _("Metaserver ADDR"),
310 _("Set ADDR as metaserver address"));
311#ifdef FREECIV_WEB
312 cmdhelp_add(help, "t",
313 /* TRANS: "type" is exactly what user must type, do not translate. */
314 _("type TYPE"),
315 _("Set TYPE as server type in metaserver"));
316#endif /* FREECIV_WEB */
317 cmdhelp_add(help, "k", "keep",
318 _("Keep updating game information on metaserver even after "
319 "failure")),
320 cmdhelp_add(help, "p",
321 /* TRANS: "port" is exactly what user must type, do not translate. */
322 _("port PORT"),
323 _("Listen for clients on port PORT"));
324 cmdhelp_add(help, "q",
325 /* TRANS: "quitidle" is exactly what user must type, do not translate. */
326 _("quitidle TIME"),
327 _("Quit if no players for TIME seconds"));
328 cmdhelp_add(help, "e", "exit-on-end",
329 _("When a game ends, exit instead of restarting"));
330 cmdhelp_add(help, "s",
331 /* TRANS: "saves" is exactly what user must type, do not translate. */
332 _("saves DIR"),
333 _("Save games to directory DIR"));
334 cmdhelp_add(help, NULL,
335 /* TRANS: "scenarios" is exactly what user must type, do not translate. */
336 _("scenarios DIR"),
337 _("Save scenarios to directory DIR"));
338 cmdhelp_add(help, "S",
339 /* TRANS: "Serverid" is exactly what user must type, do not translate. */
340 _("Serverid ID"),
341 _("Sets the server id to ID"));
342 cmdhelp_add(help, "r",
343 /* TRANS: "read" is exactly what user must type, do not translate. */
344 _("read FILE"),
345 _("Read startup script FILE"));
346 cmdhelp_add(help, "R",
347 /* TRANS: "Ranklog" is exactly what user must type, do not translate. */
348 _("Ranklog FILE"),
349 _("Use FILE as ranking logfile"));
350 cmdhelp_add(help, NULL,
351 /* TRANS: "ruleset" is exactly what user must type, do not translate. */
352 _("ruleset RULESET"),
353 _("Load ruleset RULESET"));
354#ifdef AI_MODULES
355 cmdhelp_add(help, "L",
356 /* TRANS: "LoadAI" is exactly what user must type, do not translate. */
357 _("LoadAI MODULE"),
358 _("Load ai module MODULE. Can appear multiple times"));
359#endif /* AI_MODULES */
360 cmdhelp_add(help, "v", "version",
361 _("Print the version number"));
362 cmdhelp_add(help, "w", "warnings",
363 _("Warn about deprecated modpack constructs"));
364
365 /* The function below prints a header and footer for the options.
366 * Furthermore, the options are sorted. */
367 cmdhelp_display(help, TRUE, FALSE, TRUE);
368 cmdhelp_destroy(help);
369
370 exit(EXIT_SUCCESS);
371 }
372
373#ifdef HAVE_FCDB
374 if (srvarg.auth_enabled && !srvarg.fcdb_enabled) {
375 fc_fprintf(stderr,
376 _("Requested authentication with --auth, "
377 "but no --Database given\n"));
378 exit(EXIT_FAILURE);
379 }
380#endif /* HAVE_FCDB */
381
382 /* disallow running as root -- too dangerous */
383 dont_run_as_root(argv[0], "freeciv_server");
384
385 init_our_capability();
386
387 /* have arguments, call the main server loop... */
388 srv_main();
389
390 /* Technically, we won't ever get here. We exit via server_quit. */
391
392 /* done */
393 exit(EXIT_SUCCESS);
394}
395
396#ifdef GENERATING_MAC
397/**********************************************************************/
400static void Mac_options(int argc)
401{
402#define HARDCODED_OPT
403 /*temporary hack since GetNewDialog() doesn't want to work*/
404#ifdef HARDCODED_OPT
405 srvarg.log_filename = "log.out";
406 srvarg.loglevel = LOG_DEBUG;
407#else /* HARDCODED_OPT */
408 if (argc == 0) {
409 OSErr err;
410 DialogPtr optptr;
411 Ptr storage;
412 Handle ditl;
413 Handle dlog;
414 short the_type;
415 Handle the_handle;
416 Rect the_rect;
417 short the_item, old_item = 16;
418 int done = false;
419 Str255 the_string;
420
421 /* load/init the stuff for the dialog */
422 storage = NewPtr(sizeof(DialogRecord));
423 if (storage == 0) {
424 exit(EXIT_FAILURE);
425 }
426 ditl = Get1Resource('DITL',200);
427 if ((ditl == 0) || (ResError())) {
428 exit(EXIT_FAILURE);
429 }
430 dlog = Get1Resource('DLOG',200);
431 if ((dlog == 0) || (ResError())) {
432 exit(EXIT_FAILURE);
433 }
434 /* make the dialog */
435 optptr = GetNewDialog(200, storage, (WindowPtr)-1L);
436 /* setup the dialog */
437 err = SetDialogDefaultItem(optptr, 1);
438 if (err != 0) {
439 exit(EXIT_FAILURE);
440 }
441 /* insert default highlight draw code? */
442 err = SetDialogCancelItem(optptr, 2);
443 if (err != 0) {
444 exit(EXIT_FAILURE);
445 }
446 err = SetDialogTracksCursor(optptr, true);
447 if (err != 0) {
448 exit(EXIT_FAILURE);
449 }
450 GetDItem(optptr, 16/*normal radio button*/, &the_type, &the_handle, &the_rect);
451 SetCtlValue((ControlHandle)the_handle, true);
452
453 while (!done) /* loop */
454 {
455 ModalDialog(0L, &the_item);/* don't feed 0 where a upp is expected? */
456 /* old book suggests using OL(NIL) as the first argument, but
457 It doesn't include anything about UPPs either, so... */
458 switch (the_item) {
459 case 1:
460 done = true;
461 break;
462 case 2:
463 exit(EXIT_SUCCESS);
464 break;
465 case 13:
466 GetDItem(optptr, 13, &the_type, &the_handle, &the_rect);
467 srvarg.metaserver_no_send = GetCtlValue((ControlHandle)the_handle);
468 SetCtlValue((ControlHandle)the_handle, !srvarg.metaserver_no_send);
469 break;
470 case 15:
471 case 16:
472 case 17:
473 GetDItem(optptr, old_item, &the_type, &the_handle, &the_rect);
474 SetCtlValue((ControlHandle)the_handle, false);
475 old_item = the_item;
476 GetDItem(optptr, the_item, &the_type, &the_handle, &the_rect);
477 SetCtlValue((ControlHandle)the_handle, true);
478 break;
479 }
480 }
481 /* now, load the dialog items into the correct variables interpritation */
482 GetDItem( optptr, 4, &the_type, &the_handle, &the_rect);
483 GetIText( the_handle, (unsigned char *)srvarg.load_filename);
484 GetDItem( optptr, 8, &the_type, &the_handle, &the_rect);
485 GetIText( the_handle, (unsigned char *)srvarg.log_filename);
486 GetDItem( optptr, 12, &the_type, &the_handle, &the_rect);
487 GetIText( the_handle, the_string);
488 sscanf(the_string, "%d", srvarg.port);
489 GetDItem( optptr, 10, &the_type, &the_handle, &the_rect);
490 GetIText( the_handle, (unsigned char *)srvarg.script_filename);
491 GetDItem(optptr, 15, &the_type, &the_handle, &the_rect);
492 if (GetControlValue((ControlHandle)the_handle)) {
493 srvarg.loglevel = LOG_FATAL;
494 }
495 GetDItem(optptr, 16, &the_type, &the_handle, &the_rect);
496 if (GetControlValue((ControlHandle)the_handle)) {
497 srvarg.loglevel = LOG_NORMAL;
498 }
499 GetDItem(optptr, 17, &the_type, &the_handle, &the_rect);
500 if (GetControlValue((ControlHandle)the_handle)) {
501 srvarg.loglevel = LOG_VERBOSE;
502 }
503 DisposeDialog(optptr);/*get rid of the dialog after sorting out the options*/
504 DisposePtr(storage);/*clean up the allocated memory*/
505 }
506#endif /* HARDCODED_OPT */
507#undef HARDCODED_OPT
508}
509#endif /* GENERATING_MAC */
aiiface.h
load_ai_module
bool load_ai_module(const char *modname)
init_our_capability
void init_our_capability(void)
Definition capstr.c:87
capstr.h
main
int main(int argc, char *argv[])
Definition civserver.c:72
incite_cost
char * incite_cost
Definition comments.c:74
con_write
void con_write(enum rfc_status rfc_status, const char *message,...)
Definition console.c:203
console.h
C_COMMENT
@ C_COMMENT
Definition console.h:37
C_VERSION
@ C_VERSION
Definition console.h:38
deprecation_warnings_enable
void deprecation_warnings_enable(void)
Definition deprecations.c:35
deprecations.h
cmdhelp_destroy
void cmdhelp_destroy(struct cmdhelp *pcmdhelp)
Definition fc_cmdhelp.c:70
cmdhelp_display
void cmdhelp_display(struct cmdhelp *pcmdhelp, bool sort, bool gui_options, bool report_bugs)
Definition fc_cmdhelp.c:104
cmdhelp_new
struct cmdhelp * cmdhelp_new(const char *cmdname)
Definition fc_cmdhelp.c:57
cmdhelp_add
void cmdhelp_add(struct cmdhelp *pcmdhelp, const char *shortarg, const char *longarg, const char *helpstr,...)
Definition fc_cmdhelp.c:86
fc_cmdhelp.h
is_option
bool is_option(const char *option_name, char *option)
Definition fc_cmdline.c:112
get_option_malloc
char * get_option_malloc(const char *option_name, char **argv, int *i, int argc, bool gc)
Definition fc_cmdline.c:50
fc_cmdline.h
fc_prehdrs.h
fciconv.h
fc_fprintf
void fc_fprintf(FILE *stream, const char *format,...) fc__attribute((__format__(__printf__
fcintl.h
_
#define _(String)
Definition fcintl.h:67
game
struct civ_game game
Definition game.c:62
game.h
log_parse_level_str
bool log_parse_level_str(const char *level_str, enum log_level *ret_level)
Definition log.c:86
log.h
LOG_DEBUG
@ LOG_DEBUG
Definition log.h:34
LOG_NORMAL
@ LOG_NORMAL
Definition log.h:32
LOG_FATAL
@ LOG_FATAL
Definition log.h:29
LOG_VERBOSE
@ LOG_VERBOSE
Definition log.h:33
log_error
#define log_error(message,...)
Definition log.h:103
meta.h
ANNOUNCE_IPV6
@ ANNOUNCE_IPV6
Definition net_types.h:56
ANNOUNCE_IPV4
@ ANNOUNCE_IPV4
Definition net_types.h:55
ANNOUNCE_NONE
@ ANNOUNCE_NONE
Definition net_types.h:54
ANNOUNCE_DEFAULT
#define ANNOUNCE_DEFAULT
Definition net_types.h:59
sernet.h
dont_run_as_root
void dont_run_as_root(const char *argv0, const char *fallback)
Definition shared.c:1546
str_to_int
bool str_to_int(const char *str, int *pint)
Definition shared.c:517
srvarg
struct server_arguments srvarg
Definition srv_main.c:176
srv_main
void fc__noreturn srv_main(void)
Definition srv_main.c:3531
srv_init
void srv_init(void)
Definition srv_main.c:227
srv_main.h
setup_interrupt_handlers
void setup_interrupt_handlers(void)
Definition srv_signal.c:111
srv_signal.h
civ_game::type
char type[20]
Definition game.h:266
civ_game::server
struct civ_game::@31::@35 server
civ_game::meta_info
struct civ_game::@31::@35::@38 meta_info
cmdhelp
Definition fc_cmdhelp.c:43
option
Definition options.c:478
server_arguments::metaconnection_persistent
bool metaconnection_persistent
Definition srv_main.h:30
server_arguments::bind_addr
char * bind_addr
Definition srv_main.h:34
server_arguments::loglevel
enum log_level loglevel
Definition srv_main.h:40
server_arguments::metaserver_addr
char metaserver_addr[256]
Definition srv_main.h:29
server_arguments::scenarios_pathname
char * scenarios_pathname
Definition srv_main.h:47
server_arguments::exit_on_end
bool exit_on_end
Definition srv_main.h:53
server_arguments::announce
enum announce_type announce
Definition srv_main.h:60
server_arguments::load_filename
char load_filename[512]
Definition srv_main.h:44
server_arguments::fcdb_conf
char * fcdb_conf
Definition srv_main.h:56
server_arguments::auth_allow_guests
bool auth_allow_guests
Definition srv_main.h:58
server_arguments::fcdb_enabled
bool fcdb_enabled
Definition srv_main.h:55
server_arguments::saves_pathname
char * saves_pathname
Definition srv_main.h:46
server_arguments::log_filename
char * log_filename
Definition srv_main.h:42
server_arguments::fatal_assertions
int fatal_assertions
Definition srv_main.h:61
server_arguments::ranklog_filename
char * ranklog_filename
Definition srv_main.h:43
server_arguments::quitidle
int quitidle
Definition srv_main.h:51
server_arguments::metaserver_no_send
bool metaserver_no_send
Definition srv_main.h:28
server_arguments::bind_meta_addr
char * bind_meta_addr
Definition srv_main.h:38
server_arguments::ruleset
char * ruleset
Definition srv_main.h:48
server_arguments::auth_enabled
bool auth_enabled
Definition srv_main.h:57
server_arguments::auth_allow_newusers
bool auth_allow_newusers
Definition srv_main.h:59
server_arguments::script_filename
char * script_filename
Definition srv_main.h:45
server_arguments::serverid
char serverid[256]
Definition srv_main.h:49
server_arguments::identity_name
char identity_name[256]
Definition srv_main.h:31
server_arguments::port
int port
Definition srv_main.h:36
fc_strcasecmp
int fc_strcasecmp(const char *str0, const char *str1)
Definition support.c:189
support.h
sz_strlcpy
#define sz_strlcpy(dest, src)
Definition support.h:189
TRUE
#define TRUE
Definition support.h:46
FALSE
#define FALSE
Definition support.h:47
freeciv_name_version
const char * freeciv_name_version(void)
Definition version.c:35
version.h