Add reboot database flag for outdesc
authorAri Johnson <ari@theari.com>
Sat, 23 Apr 2011 17:58:11 +0000 (13:58 -0400)
committerAri Johnson <ari@theari.com>
Sat, 23 Apr 2011 17:58:11 +0000 (13:58 -0400)
hdrs/mushdb.h
src/bsd.c

index 227bea48cbe4d70db933e5342050da93b7f20472..1ab7c4a86ca03b9d46dc200a23d491c41852eddf 100644 (file)
@@ -243,5 +243,6 @@ bool unfindable(dbref);
 #define RDBF_PUEBLO_CHECKSUM    0x04
 /* Available: 0x08 - 0x8000 */
 #define RDBF_SU_EXIT_PATH       0x00010000
+#define RDBF_OUTDESC           0x00020000
 
 #endif                          /* __DB_H */
index a12a2b10c131b6307b50262b93a6243971c8c229..a67e4d35cd66f74b766c95384ebc96e7fbbeb78c 100644 (file)
--- a/src/bsd.c
+++ b/src/bsd.c
@@ -4811,7 +4811,7 @@ dump_reboot_db(void)
   DESC *d;
   SU_PATH *exit_path;
   long flags = RDBF_SCREENSIZE | RDBF_TTYPE | RDBF_PUEBLO_CHECKSUM
-                | RDBF_SU_EXIT_PATH;
+                | RDBF_SU_EXIT_PATH | RDBF_OUTDESC;
   if (setjmp(db_err)) {
     flag_broadcast(0, 0, T("GAME: Error writing reboot database!"));
     exit(0);
@@ -4836,6 +4836,7 @@ dump_reboot_db(void)
      */
     for (; d != NULL; d = d->prev) {
       putref(f, d->descriptor);
+      putref(f, d->outdesc);
       putref(f, d->connected_at);
       putref(f, d->hide);
       putref(f, d->cmds);
@@ -4918,6 +4919,8 @@ load_reboot_db(void)
     ndescriptors++;
     d = (DESC *) mush_malloc(sizeof(DESC), "descriptor");
     d->descriptor = val;
+    if (flags & RDBF_OUTDESC)
+      d->outdesc = getref(f);
     d->input_handler = do_command;
     d->connected_at = getref(f);
     d->hide = getref(f);