-> !wants
-> !orgs info
-> special cmd's
-> !assist
-> "afk" for players without active account
-> !loot add <item_ref> <count> => nolonger breaks !account
Changes:
-> grouped !tara, !gaunt, .. into !wb
-> Display the most recent news entry on logon (default: enabled)
-> improved grouping of !items
-> Added the option to authentificate WS connections (Datanet module). This is used in special cases, where the Websocket Server requires the clien tto authentificate itself. (Server sends "#auth", client responds with the auth string)
-> Add main name to relaying (priv <-> org) [default: disabled]
-> Added logon/logoff messages back
-> restricted default access to "dangerous" commands to moderator
-> Added optional logging (Private Channel, Org Channel, Tells, ... disabled by default)

Rewrite of the Tower Module.
-> More verbosity, if enabled in config. by default, GAS and Hot timer only.
-> !hot displays currently hot (and in penalty) sites, and these which go hot in < 60 minutes
-> !attacks filterable by PF and Site
-> display current contract QL's grouped by org: !contracts (requires managed cache)
This commit is contained in:
2021-11-25 14:09:43 +01:00
parent 2d7ecf4883
commit 17c776faec
44 changed files with 1669 additions and 1249 deletions
+12 -5
View File
@@ -1,16 +1,17 @@
import json
from websocket import create_connection
from websocket import create_connection, WebSocketConnectionClosedException
from core.dict_object import DictObject
from core.logger import Logger
class WebsocketRelayWorker:
def __init__(self, inbound_queue, url, proxy):
def __init__(self, inbound_queue, url, auth):
self.logger = Logger(__name__)
self.inbound_queue = inbound_queue
self.url = url
self.auth = auth
self.ws = None
def run(self):
@@ -21,13 +22,19 @@ class WebsocketRelayWorker:
result = self.ws.recv()
while result:
obj = DictObject(json.loads(result))
self.inbound_queue.append(obj)
if result == "#auth":
self.ws.send(self.auth)
else:
obj = DictObject(json.loads(result))
self.inbound_queue.append(obj)
result = self.ws.recv()
self.ws.close()
except ConnectionRefusedError:
pass
except ConnectionResetError:
pass
except WebSocketConnectionClosedException:
pass
def send_message(self, message):
if self.ws: