Made almost the entire networking guts replaceable.

This commit is contained in:
Andrew Bastien 2020-04-12 10:24:31 -07:00
parent 21d62e651a
commit 948d14a0fb
11 changed files with 106 additions and 42 deletions

View file

@ -23,6 +23,7 @@ from evennia.utils.utils import (
make_iter,
delay,
callables_from_module,
class_from_module
)
from evennia.server.signals import SIGNAL_ACCOUNT_POST_LOGIN, SIGNAL_ACCOUNT_POST_LOGOUT
from evennia.server.signals import SIGNAL_ACCOUNT_POST_FIRST_LOGIN, SIGNAL_ACCOUNT_POST_LAST_LOGOUT
@ -857,5 +858,9 @@ class ServerSessionHandler(SessionHandler):
log_trace()
SESSION_HANDLER = ServerSessionHandler()
# import class from settings
_session_handler_class = class_from_module(settings.SERVER_SESSION_HANDLER_CLASS)
# Instantiate class. These globals are used to provide singleton-like behavior.
SESSION_HANDLER = _session_handler_class()
SESSIONS = SESSION_HANDLER # legacy