Ejemplo n.º 1
0
# Start the Evennia game server and add all active services
#
# ------------------------------------------------------------

# Tell the system the server is starting up; some things are not available yet
ServerConfig.objects.conf("server_starting_mode", True)

# twistd requires us to define the variable 'application' so it knows
# what to execute from.
application = service.Application("Evennia")

if "--nodaemon" not in sys.argv:
    # custom logging, but only if we are not running in interactive mode
    logfile = logger.WeeklyLogFile(
        os.path.basename(settings.SERVER_LOG_FILE),
        os.path.dirname(settings.SERVER_LOG_FILE),
        day_rotation=settings.SERVER_LOG_DAY_ROTATION,
        max_size=settings.SERVER_LOG_MAX_SIZE,
    )
    application.setComponent(ILogObserver,
                             logger.ServerLogObserver(logfile).emit)

# The main evennia server program. This sets up the database
# and is where we store all the other services.
EVENNIA = Evennia(application)

if AMP_ENABLED:

    # The AMP protocol handles the communication between
    # the portal and the mud server. Only reason to ever deactivate
    # it would be during testing and debugging.
Ejemplo n.º 2
0
# -------------------------------------------------------------
#
# Start the Portal proxy server and add all active services
#
# -------------------------------------------------------------


# twistd requires us to define the variable 'application' so it knows
# what to execute from.
application = service.Application('Portal')

# custom logging

if "--nodaemon" not in sys.argv:
    logfile = logger.WeeklyLogFile(os.path.basename(settings.PORTAL_LOG_FILE),
                                   os.path.dirname(settings.PORTAL_LOG_FILE))
    application.setComponent(ILogObserver, logger.PortalLogObserver(logfile).emit)

# The main Portal server program. This sets up the database
# and is where we store all the other services.
PORTAL = Portal(application)

if LOCKDOWN_MODE:

    INFO_DICT["lockdown_mode"] = '  LOCKDOWN_MODE active: Only local connections.'

if AMP_ENABLED:

    # The AMP protocol handles the communication between
    # the portal and the mud server. Only reason to ever deactivate
    # it would be during testing and debugging.