crash.c

final_realms_fluffos_v1/lib/secure/master/crash.c · 880 B

From the archive final_realms_fluffos_v1.zip

Download the archive   « Back to the archive contents

void crash(string crash_mess, object command_giver, object current_object) {

  log_file("CRASH", ctime(time())+" ");
  if (current_object)
    log_file("CRASH", "cur_ob:"+file_name(current_object)+" ");
  if (command_giver)
    log_file("CRASH", "Command_giver:"+command_giver->query_cap_name());
  log_file("CRASH", " Reason: "+crash_mess+"\n");
if(file_size("/log/debug.log") > 0) cp("/log/debug.log", "/log/debug.log.old");
 "/secure/simul_efun"->shout("Ducky shouts: Oh No! I have to crash "+
                                  "the driver now.\n");
/* Want to make sure we dont go and bomb in here. */
/* Next stuff just ends up meaning that the mud never goes down.
  obs = users();
  for (i=0;i<sizeof(obs);i++)
    obs[i]->do_force_on_me("quit");
*/
if(file_size("/log/runtime_debug.log") > 0)
    rename("/log/runtime_debug.log","/log/crash_log"+time());
} /* crash() */

Site Stats

Snippets: 1791
Codebases: 571