# a consistent list so we can reimport these on reload
importlist = [
+ "argv",
"create_pidfile",
"daemonize",
"log",
for item in importlist: exec("from mudpy import " + item)
# log an initial message
-from sys import argv
log("Started mudpy with command line: " + " ".join(argv))
# fork and disassociate
# loop indefinitely while the world is not flagged for termination or
# there are connected users
-while not universe.terminate_world or universe.userlist:
+while not universe.terminate_flag or universe.userlist:
# the world was flagged for a reload of all code/data
- if universe.reload_modules:
+ if universe.reload_flag:
# reload the mudpy module
reload(mudpy)
for item in importlist: exec("from mudpy import " + item)
- # move data into new persistent objects
- reload_data()
-
- # reset the reload flag
- universe.reload_modules = False
-
# do what needs to be done on each pulse
on_pulse()