X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy;h=8e115bd905e6058282cb7db5c309da52306ce326;hp=431c9a021bbe0baddee4f193c5505fb659e94a91;hb=a89c4b2060bf3c93207a659d88f51a4bf0f891fa;hpb=74d37bfacdd2d7c13192fe2cd5e34f03cc2e399f diff --git a/mudpy b/mudpy index 431c9a0..8e115bd 100755 --- a/mudpy +++ b/mudpy @@ -1,14 +1,16 @@ #!/usr/bin/python """Skeletal executable for the mudpy engine.""" -# Copyright (c) 2006 mudpy, Jeremy Stanley , all rights reserved. -# Licensed per terms in the LICENSE file distributed with this software. +# Copyright (c) 2004-2008 Jeremy Stanley . Permission +# to use, copy, modify, and distribute this software is granted under +# terms provided in the LICENSE file distributed with this software. # core objects for the mudpy engine import mudpy # a consistent list so we can reimport these on reload importlist = [ + "argv", "create_pidfile", "daemonize", "log", @@ -20,7 +22,6 @@ importlist = [ 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 @@ -31,21 +32,15 @@ create_pidfile(universe) # 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()