From 7da79cecb15db5b1b4a00321cd9cba67cf05bbbf Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 2 Dec 2019 23:16:33 +0000 Subject: [PATCH] Allow special packet handlers to be indexed uniquely --- houdini/handlers/__init__.py | 4 ++-- houdini/spheniscidae.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/houdini/handlers/__init__.py b/houdini/handlers/__init__.py index fbb2cb3..7970b3b 100644 --- a/houdini/handlers/__init__.py +++ b/houdini/handlers/__init__.py @@ -26,8 +26,8 @@ class _Packet: class XTPacket(_Packet): - def __init__(self, *packet_id): - super().__init__('#'.join(packet_id)) + def __init__(self, *packet_id, ext='s'): + super().__init__(ext + '%' + '#'.join(packet_id)) class XMLPacket(_Packet): diff --git a/houdini/spheniscidae.py b/houdini/spheniscidae.py index 184bd36..8fd4a24 100644 --- a/houdini/spheniscidae.py +++ b/houdini/spheniscidae.py @@ -94,7 +94,7 @@ class Spheniscidae: parsed_data = data.split('%')[1:-1] packet_id = parsed_data[2] - packet = XTPacket(packet_id) + packet = XTPacket(packet_id, ext=parsed_data[1]) if packet in self.server.xt_listeners: xt_listeners = self.server.xt_listeners[packet]