-> !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
+11 -2
View File
@@ -2,6 +2,7 @@ from core.aochat import server_packets, client_packets
from core.conn import Conn
from core.decorators import instance
from core.logger import Logger
from core.setting_service import SettingService
@instance()
@@ -19,6 +20,7 @@ class PrivateChannelService:
self.event_service = registry.get_instance("event_service")
self.character_service = registry.get_instance("character_service")
self.access_service = registry.get_instance("access_service")
self.setting_service: SettingService = registry.get_instance("setting_service")
def pre_start(self):
self.event_service.register_event_type(self.JOINED_PRIVATE_CHANNEL_EVENT)
@@ -38,15 +40,19 @@ class PrivateChannelService:
def handle_private_channel_message(self, conn: Conn, packet: server_packets.PrivateChannelMessage):
if conn.id != "main":
return
if self.setting_service.get_value("log_priv") == "1":
char_name = self.character_service.get_char_name(packet.char_id)
self.logger.log_chat(conn, "Private Channel", char_name, packet.message)
if packet.private_channel_id == self.bot.get_char_id():
self.event_service.fire_event(self.PRIVATE_CHANNEL_MESSAGE_EVENT, packet)
def handle_private_channel_client_joined(self, conn: Conn, packet: server_packets.PrivateChannelClientJoined):
if conn.id != "main":
return
if packet.private_channel_id == self.bot.get_char_id():
if self.setting_service.get_value("log_priv") == "1":
char_name = self.character_service.get_char_name(packet.char_id)
self.logger.log_chat(conn, "Private Channel", None, f"{char_name} joined the channel.")
self.private_channel_chars[packet.char_id] = packet
self.event_service.fire_event(self.JOINED_PRIVATE_CHANNEL_EVENT, packet)
@@ -55,6 +61,9 @@ class PrivateChannelService:
return
if packet.private_channel_id == self.bot.get_char_id():
if self.setting_service.get_value("log_priv") == "1":
char_name = self.character_service.get_char_name(packet.char_id)
self.logger.log_chat(conn, "Private Channel", None, f"{char_name} left the channel.")
del self.private_channel_chars[packet.char_id]
self.event_service.fire_event(self.LEFT_PRIVATE_CHANNEL_EVENT, packet)