forked from mirror/Archipelago
Compare commits
3 Commits
main
...
multiserve
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f12caf55e | ||
|
|
ad7d2157c3 | ||
|
|
27ed50ff1b |
@@ -413,6 +413,12 @@ class Context:
|
||||
self.logger.info("Notice (Player %s in team %d): %s" % (client.name, client.team + 1, text))
|
||||
async_start(self.send_msgs(client, [{"cmd": "PrintJSON", "data": [{ "text": text }], **additional_arguments}]))
|
||||
|
||||
def notify_client_without_auth(self, client: Client, text: str, additional_arguments: dict = {}):
|
||||
if client.auth:
|
||||
return self.notify_client(client, text, additional_arguments)
|
||||
self.logger.info("Notice (Unauthenticated Player): " + text)
|
||||
async_start(self.send_msgs(client, [{"cmd": "PrintJSON", "data": [{ "text": text }], **additional_arguments}]))
|
||||
|
||||
def notify_client_multiple(self, client: Client, texts: typing.List[str], additional_arguments: dict = {}):
|
||||
if not client.auth or client.no_text:
|
||||
return
|
||||
@@ -1858,6 +1864,13 @@ async def process_client_cmd(ctx: Context, client: Client, args: dict):
|
||||
await ctx.send_msgs(client, reply)
|
||||
|
||||
elif cmd == "GetDataPackage":
|
||||
if not any(isinstance(extension, PerMessageDeflate) for extension in client.socket.extensions):
|
||||
ctx.notify_client_without_auth(
|
||||
client,
|
||||
"Warning: your client does not support compressed websocket connections! "
|
||||
"DataPackage (item and location names) were rejected to be transferred."
|
||||
)
|
||||
return
|
||||
exclusions = args.get("exclusions", [])
|
||||
if "games" in args:
|
||||
games = {name: game_data for name, game_data in ctx.gamespackage.items()
|
||||
|
||||
Reference in New Issue
Block a user