ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/init.C
(Generate patch)

Comparing deliantra/server/server/init.C (file contents):
Revision 1.80 by root, Thu Apr 15 22:03:23 2010 UTC vs.
Revision 1.83 by root, Sat Apr 23 04:56:56 2011 UTC

1/* 1/*
2 * This file is part of Deliantra, the Roguelike Realtime MMORPG. 2 * This file is part of Deliantra, the Roguelike Realtime MMORPG.
3 * 3 *
4 * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team 4 * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (©) 2002 Mark Wedel & Crossfire Development Team
6 * Copyright (©) 1992 Frank Tore Johansen 6 * Copyright (©) 1992 Frank Tore Johansen
7 * 7 *
8 * Deliantra is free software: you can redistribute it and/or modify it under 8 * Deliantra is free software: you can redistribute it and/or modify it under
9 * the terms of the Affero GNU General Public License as published by the 9 * the terms of the Affero GNU General Public License as published by the
31 * information, having it here probably makes more sense. 31 * information, having it here probably makes more sense.
32 */ 32 */
33void 33void
34load_settings () 34load_settings ()
35{ 35{
36 char fname [1024]; 36 object_thawer thawer (settings.confdir, "settings");
37 sprintf (fname, "%s/settings", settings.confdir);
38 object_thawer thawer (fname);
39 37
40 if (!thawer) 38 if (!thawer)
41 { 39 {
42 LOG (llevError, "Error: No settings file found\n"); 40 LOG (llevError, "Error: No settings file found\n");
43 exit (1); 41 exit (1);
331 init_done = 0; /* Must be done before init_signal() */ 329 init_done = 0; /* Must be done before init_signal() */
332 330
333 init_environ (); 331 init_environ ();
334 cfperl_init (); 332 cfperl_init ();
335 init_done = 1; 333 init_done = 1;
336}
337
338void
339usage ()
340{
341 fprintf (stderr, "Usage: deliantra-server [-h] [-<flags>]...\n");
342}
343
344void
345help ()
346{
347
348/* The information in usage is redundant with what is given below, so why call it? */
349
350/* usage();*/
351 printf ("Flags:\n");
352 printf (" -csport <port> Specifies the port to use for the new client/server code.\n");
353 printf (" -d Turns on some debugging.\n");
354 printf (" +d Turns off debugging (useful if server compiled with debugging\n");
355 printf (" as default).\n");
356 printf (" -detach The server will go in the background, closing all\n");
357 printf (" connections to the tty.\n");
358 printf (" -h Display this information.\n");
359 printf (" -log <file> Specifies which file to send output to.\n");
360 printf (" Only has meaning if -detach is specified.\n");
361 printf (" -mon Turns on monster debugging.\n");
362 printf (" -o Prints out info on what was defined at compile time.\n");
363 printf (" -s Display the high-score list.\n");
364 printf (" -score <name or class> Displays all high scores with matching name/class.\n");
365 printf (" -v Print version and contributors.\n");
366 printf (" -data Sets the lib dir (archetypes, treasures, etc.)\n");
367 printf (" -local Read/write local data (hiscore, unique items, etc.)\n");
368 printf (" -maps Sets the directory for maps.\n");
369 printf (" -arch Sets the archetype file to use.\n");
370 printf (" -regions Sets the regions file to use.\n");
371 printf (" -playerdir Sets the directory for the player files.\n");
372 printf (" -templatedir Sets the directory for template generate maps.\n");
373 printf (" -treasures Sets the treasures file to use.\n");
374 printf (" -uniquedir Sets the unique items/maps directory.\n");
375 printf (" -tmpdir Sets the directory for temporary files (mostly maps.)\n");
376 printf (" -m Lists out suggested experience for all monsters.\n");
377 printf (" -m2 Dumps out abilities.\n");
378 printf (" -m3 Dumps out artifact information.\n");
379 printf (" -m4 Dumps out spell information.\n");
380 printf (" -m5 Dumps out skill information.\n");
381 printf (" -m6 Dumps out race information.\n");
382 printf (" -m7 Dumps out alchemy information.\n");
383 printf (" -m8 Dumps out gods information.\n");
384 printf (" -m9 Dumps out more alchemy information (formula checking).\n");
385 printf (" -mt <name> Dumps out list of treasures for a monster.\n");
386 exit (0);
387} 334}
388 335
389/* Signal handlers: */ 336/* Signal handlers: */
390 337
391static void 338static void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines