void do_dump(dbref player, const char *newfile) { char buf[BUFFER_LEN]; #ifndef DISKBASE if (global_dumper_pid != 0) { notify(player, "Sorry, there is already a dump currently in progress."); return; } #endif if (*newfile #ifdef GOD_PRIV && God(player) #endif /* GOD_PRIV */ ) { if (dumpfile) free((void *) dumpfile); dumpfile = alloc_string(newfile); snprintf(buf, sizeof(buf), "Dumping to file %s...", dumpfile); } else { snprintf(buf, sizeof(buf), "Dumping..."); } notify(player, buf); dump_db_now(); }
void prim_dump(PRIM_PROTOTYPE) { /* ( -- ) */ if (mlev < LARCH) abort_interp("Archwizard primitive."); dump_db_now(); }
void do_dump(dbref player, const char *newfile) { char buf[BUFFER_LEN]; if (Wiz(player)) { if (*newfile && Man(player)) { if (dumpfile) free( (void *)dumpfile ); dumpfile = alloc_string(newfile); sprintf(buf, CINFO "Dumping to file %s...", dumpfile); } else { sprintf(buf, CINFO "Dumping to file %s...", dumpfile); } anotify_nolisten2(player, buf); dump_db_now(); anotify_nolisten2(player, CINFO "Done."); } else { anotify_fmt(player, CFAIL "%s", tp_noperm_mesg); } }