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

Comparing deliantra/server/server/main.C (file contents):
Revision 1.82 by root, Tue Jan 9 01:28:32 2007 UTC vs.
Revision 1.83 by root, Tue Jan 9 21:32:42 2007 UTC

431void 431void
432emergency_save () 432emergency_save ()
433{ 433{
434 LOG (llevDebug, "emergency save begin.\n"); 434 LOG (llevDebug, "emergency save begin.\n");
435 435
436 maptile::emergency_save (); 436 cfperl_emergency_save ();
437 437
438 LOG (llevDebug, "saving book archive.\n"); 438 LOG (llevDebug, "saving book archive.\n");
439 write_book_archive (); 439 write_book_archive ();
440 440
441 LOG (llevDebug, "emergency save done.\n"); 441 LOG (llevDebug, "emergency save done.\n");
443 443
444// send all clients some informational text 444// send all clients some informational text
445static void 445static void
446cleanup_inform (const char *cause, bool make_core) 446cleanup_inform (const char *cause, bool make_core)
447{ 447{
448 int flags = NDI_UNIQUE | NDI_ALL | (make_core ? NDI_RED : NDI_GREEN);
449
448 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 0, 0, "The server will now shutdown.\n"); 450 new_draw_info_format (flags, 0, 0, "The server will now shutdown.\n");
449 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 0, 0, "Cause for this shtudown: %s\n", cause); 451 new_draw_info_format (flags, 0, 0, "Cause for this shtudown: %s\n", cause);
450 452
451 if (make_core) 453 if (make_core)
452 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 0, 0, "This is considered a crash.\n"); 454 new_draw_info_format (flags, 0, 0, "This is considered a crash.\n");
453 else 455 else
454 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 0, 0, "This is considered to be a clean shutdown.\n"); 456 new_draw_info_format (flags, 0, 0, "This is considered to be a clean shutdown.\n");
455 457
456 new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_RED, 0, 0, "%s\n", CLEANUP_MESSAGE); 458 new_draw_info_format (flags, 0, 0, "%s\n", CLEANUP_MESSAGE);
457 459
458 flush_sockets (); 460 flush_sockets ();
459} 461}
460 462
461/* clean up everything before exiting */ 463/* clean up everything before exiting */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines