controlling ability over the object the function is on. [RLB]
* Slight formatting fix for privileged WHO [AEJ]
* netmud and console are now built from the same source [AEJ]
+ * do_reboot moved to bsd.c to allow netmud/console compiling to
+ happen more smoothly. [RLB]
+ * safer_ufun config option support removed. Behavior is to now act
+ as if safer_ufun is always on. [RLB]
Flags:
* LEAVE_BEHIND - When a player leaves the location of
someone they're flowing with this flag it unfollows
dbref base_room; /**< Room which floating checks consider as the base */
dbref default_home; /**< Home for the homeless */
int use_dns; /**< Should we use DNS lookups? */
- int safer_ufun; /**< Should we require security for ufun calls? */
char dump_warning_1min[256]; /**< 1 minute nonforking dump warning message */
char dump_warning_5min[256]; /**< 5 minute nonforking dump warning message */
int noisy_whisper; /**< Does whisper default to whisper/noisy? */
#define NO_FORK (!options.forking_dump)
#define PLAYER_NAME_SPACES (options.player_name_spaces)
#define MAX_ALIASES (options.max_aliases)
-#define SAFER_UFUN (options.safer_ufun)
#define NOISY_WHISPER (options.noisy_whisper)
#define POSSESSIVE_GET (options.possessive_get)
#define POSSGET_ON_DISCONNECTED (options.possessive_get_d)
/* This is carefully ordered, from most to least likely. Hopefully. */
-#define CanEval(x,y) (!(SAFER_UFUN) || !Admin(y) || God(x) || \
+#define CanEval(x,y) (!Admin(y) || God(x) || \
((Director(x) || (Admin(x) && !Director(y))) && !God(y)))
/* AF_PUBLIC overrides SAFER_UFUN */
{"TINYFUGUE", CONN_PROMPT},
{NULL, -1}
};
-#endif
+#endif /* COMPILE_CONSOLE */
/** Is this descriptor connected to a telnet-compatible terminal? */
return 1;
} else return 0;
}
+
+/* this should be in wiz.c but console.c likes it here better */
+
+/** Reboot the game without disconnecting players.
+ * \verbatim
+ * This implements @shutdown/reboot, which performs a dump, saves
+ * information about which player is associated with which socket,
+ * and then re-execs the mush process without closing the sockets.
+ * \endverbatim
+ * \param player the enactor.
+ * \param flag if 0, normal dump; if 1, paranoid dump.
+ */
+void
+do_reboot(dbref player, int flag)
+{
+ if (player == NOTHING) {
+ flag_broadcast(0, 0,
+ T
+ ("GAME: Reboot w/o disconnect from game account, please wait."));
+ } else {
+ flag_broadcast(0, 0,
+ T
+ ("GAME: Reboot w/o disconnect by %s, please wait."),
+ Name(Owner(player)));
+ }
+ if (flag) {
+ globals.paranoid_dump = 1;
+ globals.paranoid_checkpt = db_top / 5;
+ if (globals.paranoid_checkpt < 1)
+ globals.paranoid_checkpt = 1;
+ }
+#ifdef HAS_OPENSSL
+ close_ssl_connections();
+#endif
+ sql_shutdown();
+ shutdown_queues();
+ fork_and_dump(0);
+#ifndef PROFILING
+#ifndef WIN32
+ /* Some broken libcs appear to retain the itimer across exec!
+ * So we make sure that if we get a SIGPROF in our next incarnation,
+ * we ignore it until our proper handler is set up.
+ */
+ ignore_signal(SIGPROF);
+#endif
+#endif
+ dump_reboot_db();
+#if !defined(COMPILE_CONSOLE) && defined(INFO_SLAVE)
+ kill_info_slave();
+#endif
+ local_shutdown();
+ end_all_logs();
+#ifndef WIN32
+ execl("netmush", "netmush", confname, NULL);
+#else
+ execl("cobramush.exe", "cobramush.exe", "/run", NULL);
+#endif /* WIN32 */
+ exit(1); /* Shouldn't ever get here, but just in case... */
+}
"flags"}
,
- {"safer_ufun", cf_bool, &options.safer_ufun, 2, 0, "funcs"}
- ,
{"function_side_effects", cf_bool, &options.function_side_effects, 2, 0,
"funcs"}
,
strcpy(options.channel_flags, "");
options.warn_interval = 3600;
options.use_dns = 1;
- options.safer_ufun = 1;
strcpy(options.dump_warning_1min,
T("GAME: Database will be dumped in 1 minute."));
strcpy(options.dump_warning_5min,
safe_integer(tot, buff, bp);
}
-
-/** Reboot the game without disconnecting players.
- * \verbatim
- * This implements @shutdown/reboot, which performs a dump, saves
- * information about which player is associated with which socket,
- * and then re-execs the mush process without closing the sockets.
- * \endverbatim
- * \param player the enactor.
- * \param flag if 0, normal dump; if 1, paranoid dump.
- */
-void
-do_reboot(dbref player, int flag)
-{
- if (player == NOTHING) {
- flag_broadcast(0, 0,
- T
- ("GAME: Reboot w/o disconnect from game account, please wait."));
- } else {
- flag_broadcast(0, 0,
- T
- ("GAME: Reboot w/o disconnect by %s, please wait."),
- Name(Owner(player)));
- }
- if (flag) {
- globals.paranoid_dump = 1;
- globals.paranoid_checkpt = db_top / 5;
- if (globals.paranoid_checkpt < 1)
- globals.paranoid_checkpt = 1;
- }
-#ifdef HAS_OPENSSL
- close_ssl_connections();
-#endif
- sql_shutdown();
- shutdown_queues();
- fork_and_dump(0);
-#ifndef PROFILING
-#ifndef WIN32
- /* Some broken libcs appear to retain the itimer across exec!
- * So we make sure that if we get a SIGPROF in our next incarnation,
- * we ignore it until our proper handler is set up.
- */
- ignore_signal(SIGPROF);
-#endif
-#endif
- dump_reboot_db();
-#ifdef INFO_SLAVE
- kill_info_slave();
-#endif
- local_shutdown();
- end_all_logs();
-#ifndef WIN32
- execl("netmush", "netmush", confname, NULL);
-#else
- execl("cobramush.exe", "cobramush.exe", "/run", NULL);
-#endif /* WIN32 */
- exit(1); /* Shouldn't ever get here, but just in case... */
-}
-
-
static int
fill_search_spec(dbref player, const char *owner, int nargs, const char **args,
struct search_spec *spec)