mirror of
https://github.com/evennia/evennia.git
synced 2026-03-26 01:36:32 +01:00
Implemented working MCCP (data compression) and MSSP (mud-listing crawler support). Moved all user-level customization modules from gamesrc/world to gamesrc/conf to reduce clutter.
This commit is contained in:
parent
a4f8019c4a
commit
fb78758356
15 changed files with 465 additions and 48 deletions
|
|
@ -89,6 +89,7 @@ class ServerSessionHandler(SessionHandler):
|
|||
"""
|
||||
self.sessions = {}
|
||||
self.server = None
|
||||
self.server_data = {"servername":settings.SERVERNAME}
|
||||
|
||||
def portal_connect(self, sessid, session):
|
||||
"""
|
||||
|
|
@ -333,6 +334,16 @@ class PortalSessionHandler(SessionHandler):
|
|||
self.portal = None
|
||||
self.sessions = {}
|
||||
self.latest_sessid = 0
|
||||
self.uptime = time.time()
|
||||
self.connection_time = 0
|
||||
|
||||
def at_server_connection(self):
|
||||
"""
|
||||
Called when the Portal establishes connection with the
|
||||
Server. At this point, the AMP connection is already
|
||||
established.
|
||||
"""
|
||||
self.connection_time = time.time()
|
||||
|
||||
def connect(self, session):
|
||||
"""
|
||||
|
|
@ -373,6 +384,14 @@ class PortalSessionHandler(SessionHandler):
|
|||
session.disconnect(reason)
|
||||
del session
|
||||
|
||||
|
||||
def count_loggedin(self, include_unloggedin=False):
|
||||
"""
|
||||
Count loggedin connections, alternatively count all connections.
|
||||
"""
|
||||
return len(self.get_sessions(include_unloggedin=include_unloggedin))
|
||||
|
||||
|
||||
def session_from_suid(self, suid):
|
||||
"""
|
||||
Given a session id, retrieve the session (this is primarily
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue