--- deliantra/server/server/main.C 2007/09/05 05:48:36 1.114 +++ deliantra/server/server/main.C 2007/09/08 09:15:50 1.115 @@ -395,64 +395,14 @@ } else { - new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting."); - new_draw_info_format (NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE); + new_draw_info_format (NDI_REPLY | NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "Maps and players successfully saved, exiting."); + new_draw_info_format (NDI_REPLY | NDI_UNIQUE | NDI_ALL | NDI_GREEN, 0, 0, "And again: " CLEANUP_MESSAGE); client::flush_sockets (); cfperl_cleanup (make_core); _exit (0); } } -int -forbid_play (void) -{ -#if !defined(_IBMR2) && !defined(___IBMR2) && defined(PERM_FILE) - char buf[MAX_BUF], day[MAX_BUF]; - FILE *fp; - time_t clock; - struct tm *tm; - int i, start, stop, forbit = 0, comp; - - clock = time (NULL); - tm = (struct tm *) localtime (&clock); - - sprintf (buf, "%s/%s", settings.confdir, PERM_FILE); - if ((fp = open_and_uncompress (buf, 0, &comp)) == NULL) - return 0; - - while (fgets (buf, MAX_BUF, fp)) - { - if (buf[0] == '#') - continue; - - if (!strncmp (buf, "msg", 3)) - { - if (forbit) - while (fgets (buf, MAX_BUF, fp)) /* print message */ - fputs (buf, logfile); - break; - } - else if (sscanf (buf, "%s %d%*c%d\n", day, &start, &stop) != 3) - { - LOG (llevDebug, "Warning: Incomplete line in permission file ignored.\n"); - continue; - } - - for (i = 0; i < 7; i++) - { - if (!strncmp (buf, days[i], 3) && (tm->tm_wday == i) && (tm->tm_hour >= start) && (tm->tm_hour < stop)) - forbit = 1; - } - } - - close_and_delete (fp, comp); - - return forbit; -#else - return 0; -#endif -} - /* * do_specials() is a collection of functions to call from time to time. * Modified 2000-1-14 MSW to use the global pticks count to determine how