… | |
… | |
38 | }; |
38 | }; |
39 | |
39 | |
40 | void |
40 | void |
41 | version (object *op) |
41 | version (object *op) |
42 | { |
42 | { |
43 | if (op) |
|
|
44 | clear_win_info (op); |
|
|
45 | |
|
|
46 | new_draw_info_format (NDI_UNIQUE, 0, op, "This is Crossfire+ v%s", VERSION); |
43 | new_draw_info_format (NDI_UNIQUE, 0, op, "This is Crossfire+ v%s", VERSION); |
47 | |
44 | |
48 | new_draw_info (NDI_UNIQUE, 0, op, "Authors and contributors to this program:"); |
45 | new_draw_info (NDI_UNIQUE, 0, op, "Authors and contributors to this program:"); |
49 | new_draw_info (NDI_UNIQUE, 0, op, "Marc A. Lehmann <pcg@goof.com>"); |
46 | new_draw_info (NDI_UNIQUE, 0, op, "Marc A. Lehmann <pcg@goof.com>"); |
50 | new_draw_info (NDI_UNIQUE, 0, op, "Robin Redeker <elmex@x-paste.de>"); |
47 | new_draw_info (NDI_UNIQUE, 0, op, "Robin Redeker <elmex@x-paste.de>"); |
… | |
… | |
349 | static void |
346 | static void |
350 | cleanup_inform (const char *cause, bool make_core) |
347 | cleanup_inform (const char *cause, bool make_core) |
351 | { |
348 | { |
352 | int flags = NDI_UNIQUE | NDI_ALL | (make_core ? NDI_RED : NDI_GREEN); |
349 | int flags = NDI_UNIQUE | NDI_ALL | (make_core ? NDI_RED : NDI_GREEN); |
353 | |
350 | |
354 | new_draw_info_format (flags, 0, 0, "The server will now shutdown.\n"); |
351 | new_draw_info_format (flags, 0, 0, "The server will now shutdown."); |
355 | new_draw_info_format (flags, 0, 0, "Cause for this shutdown: %s\n", cause); |
352 | new_draw_info_format (flags, 0, 0, "Cause for this shutdown: %s", cause); |
356 | |
353 | |
357 | if (make_core) |
354 | if (make_core) |
358 | new_draw_info_format (flags, 0, 0, "This is considered a crash, but all maps and players have been saved.\n"); |
355 | new_draw_info_format (flags, 0, 0, "This is considered a crash, but all maps and players have been saved."); |
359 | else |
356 | else |
360 | new_draw_info_format (flags, 0, 0, "This is considered to be a clean shutdown, and all maps and players will be saved now.\n"); |
357 | new_draw_info_format (flags, 0, 0, "This is considered to be a clean shutdown, and all maps and players will be saved now."); |
361 | |
358 | |
362 | new_draw_info_format (flags, 0, 0, "%s\n", CLEANUP_MESSAGE); |
359 | new_draw_info_format (flags, 0, 0, "%s", CLEANUP_MESSAGE); |
363 | |
360 | |
364 | flush_sockets (); |
361 | flush_sockets (); |
365 | } |
362 | } |
366 | |
363 | |
367 | /* clean up everything before exiting */ |
364 | /* clean up everything before exiting */ |
… | |
… | |
397 | cfperl_cleanup (make_core); |
394 | cfperl_cleanup (make_core); |
398 | _exit (1); |
395 | _exit (1); |
399 | } |
396 | } |
400 | else |
397 | else |
401 | { |
398 | { |
402 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting.\n"); |
399 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting."); |
403 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE "\n"); |
400 | new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE); |
404 | flush_sockets (); |
401 | flush_sockets (); |
405 | cfperl_cleanup (make_core); |
402 | cfperl_cleanup (make_core); |
406 | _exit (0); |
403 | _exit (0); |
407 | } |
404 | } |
408 | } |
405 | } |