… | |
… | |
278 | {"-m6", 0, 3, set_dumpmon6}, |
278 | {"-m6", 0, 3, set_dumpmon6}, |
279 | {"-m7", 0, 3, set_dumpmon7}, |
279 | {"-m7", 0, 3, set_dumpmon7}, |
280 | {"-m8", 0, 3, set_dumpmon8}, |
280 | {"-m8", 0, 3, set_dumpmon8}, |
281 | {"-m9", 0, 3, set_dumpmon9}, |
281 | {"-m9", 0, 3, set_dumpmon9}, |
282 | {"-mt", 1, 3, (void (*)()) set_dumpmont}, |
282 | {"-mt", 1, 3, (void (*)()) set_dumpmont}, |
283 | {"-mexp", 0, 3, dump_experience}, |
|
|
284 | {"-s", 0, 3, showscores}, |
283 | {"-s", 0, 3, showscores}, |
285 | {"-score", 1, 3, (void (*)()) showscoresparm} |
284 | {"-score", 1, 3, (void (*)()) showscoresparm} |
286 | }; |
285 | }; |
287 | |
286 | |
288 | |
287 | |
… | |
… | |
915 | init (int argc, char **argv) |
914 | init (int argc, char **argv) |
916 | { |
915 | { |
917 | init_done = 0; /* Must be done before init_signal() */ |
916 | init_done = 0; /* Must be done before init_signal() */ |
918 | rndm.seed (time (0)); |
917 | rndm.seed (time (0)); |
919 | |
918 | |
920 | logfile = stderr; |
|
|
921 | init_environ (); |
919 | init_environ (); |
922 | parse_args (argc, argv, 1); /* First arg pass - right now it does |
920 | parse_args (argc, argv, 1); /* First arg pass - right now it does |
923 | * nothing, but in future specifying the |
921 | * nothing, but in future specifying the |
924 | * LibDir in this pass would be reasonable*/ |
922 | * LibDir in this pass would be reasonable*/ |
925 | |
923 | |
… | |
… | |
931 | init_block (); |
929 | init_block (); |
932 | cfperl_init (); |
930 | cfperl_init (); |
933 | load_settings (); /* Load the settings file */ |
931 | load_settings (); /* Load the settings file */ |
934 | load_materials (); |
932 | load_materials (); |
935 | parse_args (argc, argv, 2); |
933 | parse_args (argc, argv, 2); |
936 | fprintf (logfile, "Welcome to Deliantra, v%s\n", VERSION); |
934 | LOG (llevInfo, "Welcome to Deliantra, v" VERSION); |
937 | fprintf (logfile, "Copyright (C) 2005, 2006, 2007 Marc Lehmann.\n"); |
935 | LOG (llevInfo, "Copyright (C) 2005, 2006, 2007 Marc Lehmann."); |
938 | fprintf (logfile, "Copyright (C) 1994 Mark Wedel.\n"); |
936 | LOG (llevInfo, "Copyright (C) 1994 Mark Wedel."); |
939 | fprintf (logfile, "Copyright (C) 1992 Frank Tore Johansen.\n"); |
937 | LOG (llevInfo, "Copyright (C) 1992 Frank Tore Johansen."); |
940 | |
938 | |
941 | if (strcmp (settings.dm_mail, "") != 0) |
939 | if (strcmp (settings.dm_mail, "") != 0) |
942 | { |
940 | { |
943 | fprintf (logfile, "Maintained locally by: %s\n", settings.dm_mail); |
941 | LOG (llevInfo, "Maintained locally by: %s\n", settings.dm_mail); |
944 | fprintf (logfile, "Questions and bugs should be mailed to above address.\n"); |
942 | LOG (llevInfo, "Questions and bugs should be mailed to above address.\n"); |
945 | } |
943 | } |
946 | |
944 | |
947 | UUID::init (); |
945 | UUID::init (); |
948 | init_signals (); /* Sets up signal interceptions */ |
946 | init_signals (); /* Sets up signal interceptions */ |
949 | init_commands (); /* Sort command tables */ |
947 | init_commands (); /* Sort command tables */ |
… | |
… | |
956 | } |
954 | } |
957 | |
955 | |
958 | void |
956 | void |
959 | usage (void) |
957 | usage (void) |
960 | { |
958 | { |
961 | (void) fprintf (logfile, "Usage: deliantra-server [-h] [-<flags>]...\n"); |
959 | fprintf (stderr, "Usage: deliantra-server [-h] [-<flags>]...\n"); |
962 | } |
960 | } |
963 | |
961 | |
964 | void |
962 | void |
965 | help (void) |
963 | help (void) |
966 | { |
964 | { |