Server module should be accessed through proxy, i.e. through the sessionhandler, at all times. Resolves issue 127. Script updates made @ps non-compatible, fixed the formatting. Resolves issue 128.

This commit is contained in:
Griatch 2011-02-21 12:56:44 +00:00
parent f0b4c581f7
commit 5464487c93
4 changed files with 31 additions and 16 deletions

View file

@ -78,6 +78,9 @@ class Evennia(object):
# we have to null this here.
SESSIONS.session_count(0)
# we link ourself to the sessionhandler so other modules don't have to
# re-import the server module itself (which would re-initialize it).
SESSIONS.server = self
self.start_time = time.time()

View file

@ -47,6 +47,9 @@ class SessionHandler(object):
self.unloggedin = []
self.loggedin = []
# we keep a link to the server here, for the rest of the game to access.
self.server = None
def add_unloggedin_session(self, session):
"""
Call at first connect. This adds a not-yet authenticated session.