mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 22:17:17 +02:00
Rename protocol_keys ssl->telnet/ssl, websocket->webclient/websocket, ajax/comet->webclient/ajax.
This commit is contained in:
parent
37a5a67391
commit
e31b2a1ee4
6 changed files with 10 additions and 6 deletions
|
|
@ -90,6 +90,7 @@ class SshProtocol(Manhole, session.Session):
|
|||
starttuple (tuple): A (account, factory) tuple.
|
||||
|
||||
"""
|
||||
self.protocol_key = "ssh"
|
||||
self.authenticated_account = starttuple[0]
|
||||
# obs must not be called self.factory, that gets overwritten!
|
||||
self.cfactory = starttuple[1]
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.protocol_name = "telnet"
|
||||
super(TelnetProtocol, self).__init__(*args, **kwargs)
|
||||
self.protocol_key = "telnet"
|
||||
|
||||
def connectionMade(self):
|
||||
"""
|
||||
|
|
@ -49,7 +49,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
# this number is counted down for every handshake that completes.
|
||||
# when it reaches 0 the portal/server syncs their data
|
||||
self.handshakes = 8 # suppress-go-ahead, naws, ttype, mccp, mssp, msdp, gmcp, mxp
|
||||
self.init_session(self.protocol_name, client_address, self.factory.sessionhandler)
|
||||
self.init_session(self.protocol_key, client_address, self.factory.sessionhandler)
|
||||
# add this new connection to sessionhandler so
|
||||
# the Server becomes aware of it.
|
||||
self.sessionhandler.connect(self)
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class SSLProtocol(TelnetProtocol):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(SSLProtocol, self).__init__(*args, **kwargs)
|
||||
self.protocol_name = "ssl"
|
||||
self.protocol_key = "telnet/ssl"
|
||||
|
||||
|
||||
def verify_or_create_SSL_key_and_cert(keyfile, certfile):
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ class WebSocketClient(Protocol, Session):
|
|||
"""
|
||||
Implements the server-side of the Websocket connection.
|
||||
"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(WebSocketClient, self).__init__(*args, **kwargs)
|
||||
self.protocol_key = "webclient/websocket"
|
||||
|
||||
def connectionMade(self):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class AjaxWebClientSession(session.Session):
|
|||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.protocol_name = "ajax/comet"
|
||||
self.protocol_key = "webclient/ajax"
|
||||
super(AjaxWebClientSession, self).__init__(*args, **kwargs)
|
||||
|
||||
def get_client_session(self):
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ class Session(object):
|
|||
a new session is established.
|
||||
|
||||
Args:
|
||||
protocol_key (str): By default, one of 'telnet', 'ssh',
|
||||
'ssl' or 'web'.
|
||||
protocol_key (str): By default, one of 'telnet', 'telnet/ssl', 'ssh',
|
||||
'webclient/websocket' or 'webclient/ajax'.
|
||||
address (str): Client address.
|
||||
sessionhandler (SessionHandler): Reference to the
|
||||
main sessionhandler instance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue