mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
First working version of the shared web login.
This commit is contained in:
parent
81170b69d0
commit
a31441b3ce
9 changed files with 130 additions and 8 deletions
|
|
@ -369,6 +369,10 @@ class ServerSessionHandler(SessionHandler):
|
|||
|
||||
"""
|
||||
|
||||
if session.logged_in:
|
||||
# don't log in a session that is already logged in.
|
||||
return
|
||||
|
||||
# we have to check this first before uid has been assigned
|
||||
# this session.
|
||||
|
||||
|
|
@ -589,6 +593,17 @@ class ServerSessionHandler(SessionHandler):
|
|||
return sessions[0] if len(sessions) == 1 else sessions
|
||||
sessions_from_character = sessions_from_puppet
|
||||
|
||||
def sessions_from_browserid(self, browserid):
|
||||
"""
|
||||
Given a browserid, return all sessions having this id.
|
||||
|
||||
Args
|
||||
browserid (str): The browserid hash
|
||||
|
||||
"""
|
||||
return [session for session in self.values()
|
||||
if session.browserid and session.browserid == browserid]
|
||||
|
||||
def announce_all(self, message):
|
||||
"""
|
||||
Send message to all connected sessions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue