mirror of
https://github.com/evennia/evennia.git
synced 2026-03-24 16:56:32 +01:00
Ran black
This commit is contained in:
parent
67967b8aeb
commit
a8d569979d
4 changed files with 13 additions and 7 deletions
|
|
@ -606,6 +606,7 @@ def msdp_send(session, *args, **kwargs):
|
|||
out[varname] = _monitorable[varname.lower()]
|
||||
session.msg(send=((), out))
|
||||
|
||||
|
||||
# client specific
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ class Mssp(object):
|
|||
"NAME": settings.SERVERNAME,
|
||||
"PLAYERS": self.get_player_count,
|
||||
"UPTIME": self.get_uptime,
|
||||
"PORT": list(str(port) for port in
|
||||
reversed(settings.TELNET_PORTS)
|
||||
"PORT": list(
|
||||
str(port) for port in reversed(settings.TELNET_PORTS)
|
||||
), # most important port should be last in list
|
||||
# Evennia auto-filled
|
||||
"CRAWL DELAY": "-1",
|
||||
|
|
@ -120,10 +120,15 @@ class Mssp(object):
|
|||
if utils.is_iter(value):
|
||||
for partval in value:
|
||||
varlist += (
|
||||
MSSP_VAR + bytes(str(variable), "utf-8") + MSSP_VAL + bytes(str(partval), "utf-8")
|
||||
MSSP_VAR
|
||||
+ bytes(str(variable), "utf-8")
|
||||
+ MSSP_VAL
|
||||
+ bytes(str(partval), "utf-8")
|
||||
)
|
||||
else:
|
||||
varlist += MSSP_VAR + bytes(str(variable), "utf-8") + MSSP_VAL + bytes(str(value), "utf-8")
|
||||
varlist += (
|
||||
MSSP_VAR + bytes(str(variable), "utf-8") + MSSP_VAL + bytes(str(value), "utf-8")
|
||||
)
|
||||
|
||||
# send to crawler by subnegotiation
|
||||
self.protocol.requestNegotiation(MSSP, varlist)
|
||||
|
|
|
|||
|
|
@ -197,8 +197,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
if option == LINEMODE:
|
||||
# make sure to activate line mode with local editing for all clients
|
||||
self.requestNegotiation(
|
||||
LINEMODE, MODE + bytes(chr(ord(LINEMODE_EDIT) +
|
||||
ord(LINEMODE_TRAPSIG)), "ascii")
|
||||
LINEMODE, MODE + bytes(chr(ord(LINEMODE_EDIT) + ord(LINEMODE_TRAPSIG)), "ascii")
|
||||
)
|
||||
return True
|
||||
else:
|
||||
|
|
@ -258,6 +257,7 @@ class TelnetProtocol(Telnet, StatefulTelnetProtocol, Session):
|
|||
return super().disableLocal(option)
|
||||
except Exception:
|
||||
from evennia.utils import logger
|
||||
|
||||
logger.log_trace()
|
||||
|
||||
def connectionLost(self, reason):
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import re
|
|||
import json
|
||||
from evennia.utils.utils import is_iter
|
||||
from twisted.python.compat import _bytesChr as bchr
|
||||
|
||||
# General Telnet
|
||||
from twisted.conch.telnet import IAC, SB, SE
|
||||
|
||||
|
|
@ -46,7 +47,6 @@ MSDP_ARRAY_CLOSE = bchr(6)
|
|||
GMCP = bchr(201)
|
||||
|
||||
|
||||
|
||||
# pre-compiled regexes
|
||||
# returns 2-tuple
|
||||
msdp_regex_table = re.compile(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue