bug fixes and improvements

- aliases are now handled properly in ABCH
- removed final escargot leftovers (dev webconsole)
- OSCAR etc. logging was not at log level debug
- removed leftover debug code
This commit is contained in:
Athena Funderburg committed 2026-11-06 00:36:13 +00:00
1 parent 4bf878556b
commit 6451bb9426
46 files changed
+307 -541

No files matched your search

+12 -12
View File
@@ -118,7 +118,7 @@ class LocateFoodgroup:
@Subgroup(0x0002)
def client_versions(self, client: OSCARClient, context: OSCARContext, message: SNACMessage) -> None:
self.logger.info('[Client] LOCATE__RIGHTS_QUERY')
self.logger.debug('[Client] LOCATE__RIGHTS_QUERY')
response_msg = SNACMessage(0x0002, 0x0003, 0x0000, message.request_id)
@@ -145,12 +145,12 @@ class LocateFoodgroup:
TLV(0x0005, struct.pack('>H', 0x0080)) # unknown
])
self.logger.info('[Server] LOCATE__RIGHTS_REPLY')
self.logger.debug('[Server] LOCATE__RIGHTS_REPLY')
client.send_snac(response_msg)
@Subgroup(0x0004)
def set_info(self, client: OSCARClient, context: OSCARContext, message: SNACMessage) -> None:
self.logger.info('[Client] LOCATE__SET_INFO')
self.logger.debug('[Client] LOCATE__SET_INFO')
bs = context.bs
tlvs = unmarshal_tlvs(message.data)
@@ -200,7 +200,7 @@ class LocateFoodgroup:
# u16 type (LOCATE_TYPE_*), string08 who
query_type = message.read_u16()
name = message.read_bytes(message.read_u8()).decode('latin-1')
self.logger.info('[Client] LOCATE__USER_INFO_QUERY for', name, '(type', hex(query_type) + ')')
self.logger.debug('[Client] LOCATE__USER_INFO_QUERY for', name, '(type', hex(query_type) + ')')
user_info_reply(client, context, message, query_type, name)
@Subgroup(0x0015)
@@ -208,12 +208,12 @@ class LocateFoodgroup:
# the same query with a u32 type
query_type = message.read_u32()
name = message.read_bytes(message.read_u8()).decode('latin-1')
self.logger.info('[Client] LOCATE__USER_INFO_QUERY2 for', name, '(type', hex(query_type) + ')')
self.logger.debug('[Client] LOCATE__USER_INFO_QUERY2 for', name, '(type', hex(query_type) + ')')
user_info_reply(client, context, message, query_type & 0xFFFF, name)
@Subgroup(0x0009)
def set_dir_info(self, client: OSCARClient, context: OSCARContext, message: SNACMessage) -> None:
self.logger.info('[Client] LOCATE__SET_DIR_INFO')
self.logger.debug('[Client] LOCATE__SET_DIR_INFO')
# a TLV per ODIR field; whatever is sent replaces what was there
store = dir_info(context.user)
@@ -225,15 +225,15 @@ class LocateFoodgroup:
# LOCATE__SET_DIR_REPLY: u16 result, 1 for success
reply = SNACMessage(0x0002, 0x000A, 0x0000, message.request_id)
reply.write_u16(0x0001)
self.logger.info('[Server] LOCATE__SET_DIR_REPLY')
self.logger.debug('[Server] LOCATE__SET_DIR_REPLY')
client.send_snac(reply)
@Subgroup(0x000B)
def get_dir_info(self, client: OSCARClient, context: OSCARContext, message: SNACMessage) -> None:
self.logger.info('[Client] LOCATE__GET_DIR_INFO')
self.logger.debug('[Client] LOCATE__GET_DIR_INFO')
screen_name = message.read_bytes(message.read_u8()).decode('latin-1')
self.logger.info('[Client] Getting info for:', screen_name)
self.logger.debug('[Client] Getting info for:', screen_name)
# Response from NINA's servers:
# ==
@@ -253,12 +253,12 @@ class LocateFoodgroup:
tlvs = dir_tlvs(target) + tlvs
response_msg.write_tlv_block(tlvs)
self.logger.info('[Server] LOCATE__GET_DIR_REPLY')
self.logger.debug('[Server] LOCATE__GET_DIR_REPLY')
client.send_snac(response_msg)
@Subgroup(0x000F)
def set_keyword_info(self, client: OSCARClient, context: OSCARContext, message: SNACMessage) -> None:
self.logger.info('[Client] LOCATE__SET_KEYWORD_INFO')
self.logger.debug('[Client] LOCATE__SET_KEYWORD_INFO')
# up to five interests, TLV 0x0B each
interests = [tlv.data.decode('latin-1') for tlv in unmarshal_tlvs(message.data) if tlv.type == DIR_INTEREST]
@@ -268,5 +268,5 @@ class LocateFoodgroup:
# LOCATE__SET_KEYWORD_REPLY: u16, 1
reply = SNACMessage(0x0002, 0x0010, 0x0000, message.request_id)
reply.write_u16(0x0001)
self.logger.info('[Server] LOCATE__SET_KEYWORD_REPLY')
self.logger.debug('[Server] LOCATE__SET_KEYWORD_REPLY')
client.send_snac(reply)