Adding the beginnings of IMC2 support. We are now able to connect and authenticate with an IMC2 network, theoretically without blocking our server thread. We can't actually do anything useful just yet, but stay tuned.

This commit is contained in:
Greg Taylor 2009-04-11 05:55:26 +00:00
parent 65d8ac8bdc
commit a7e89c1e54
6 changed files with 272 additions and 1 deletions

View file

@ -7,6 +7,7 @@ from django.db import connection
from django.conf import settings
from src.config.models import ConfigValue
from src.session import SessionProtocol
from src.imc2.connection import IMC2ClientFactory
from src import events
from src import logger
from src import session_mgr
@ -140,4 +141,14 @@ mud_service = EvenniaService()
# Sheet sheet, fire ze missiles!
serviceCollection = service.IServiceCollection(application)
for port in settings.GAMEPORTS:
internet.TCPServer(port, mud_service.getEvenniaServiceFactory()).setServiceParent(serviceCollection)
internet.TCPServer(port,
mud_service.getEvenniaServiceFactory()).setServiceParent(serviceCollection)
if settings.IMC2_ENABLED:
imc2_factory = IMC2ClientFactory()
svc = internet.TCPClient(settings.IMC2_SERVER_ADDRESS,
settings.IMC2_SERVER_PORT,
imc2_factory)
svc.setName('IMC2')
svc.setServiceParent(serviceCollection)