mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
You may now specify a list of ports in settings.py to listen on instead of just a straight integer value. You'll need to copy GAMEPORTS from settings.py.dist if you have an existing game.
This commit is contained in:
parent
270f7e7128
commit
debb34aae9
2 changed files with 7 additions and 5 deletions
|
|
@ -61,7 +61,6 @@ class EvenniaService(service.Service):
|
|||
print '-'*50
|
||||
# Load command aliases into memory for easy/quick access.
|
||||
self.load_cmd_aliases()
|
||||
self.port = settings.GAMEPORT
|
||||
|
||||
if gameconf.get_configvalue('game_firstrun') == '1':
|
||||
print ' Game started for the first time, setting defaults.'
|
||||
|
|
@ -69,7 +68,9 @@ class EvenniaService(service.Service):
|
|||
|
||||
self.start_time = time.time()
|
||||
|
||||
print ' %s started on port %s.' % (gameconf.get_configvalue('site_name'), self.port,)
|
||||
print ' %s started on port(s):' % (gameconf.get_configvalue('site_name'),)
|
||||
for port in settings.GAMEPORTS:
|
||||
print ' * %s' % (port)
|
||||
print '-'*50
|
||||
scheduler.start_events()
|
||||
|
||||
|
|
@ -146,4 +147,5 @@ mud_service = EvenniaService('Evennia Server')
|
|||
|
||||
# Sheet sheet, fire ze missiles!
|
||||
serviceCollection = service.IServiceCollection(application)
|
||||
internet.TCPServer(settings.GAMEPORT, mud_service.getEvenniaServiceFactory()).setServiceParent(serviceCollection)
|
||||
for port in settings.GAMEPORTS:
|
||||
internet.TCPServer(port, mud_service.getEvenniaServiceFactory()).setServiceParent(serviceCollection)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# A list of ports to listen on.
|
||||
GAMEPORTS = [4000]
|
||||
|
||||
# The port for the game to run on.
|
||||
GAMEPORT = 4000
|
||||
# The name of the server log file.
|
||||
LOGFILE = 'logs/evennia.log'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue