mirror of
https://github.com/solero/houdini.git
synced 2024-11-22 05:27:23 +00:00
Allow special packet handlers to be indexed uniquely
This commit is contained in:
parent
ade40f914b
commit
7da79cecb1
@ -26,8 +26,8 @@ class _Packet:
|
|||||||
|
|
||||||
|
|
||||||
class XTPacket(_Packet):
|
class XTPacket(_Packet):
|
||||||
def __init__(self, *packet_id):
|
def __init__(self, *packet_id, ext='s'):
|
||||||
super().__init__('#'.join(packet_id))
|
super().__init__(ext + '%' + '#'.join(packet_id))
|
||||||
|
|
||||||
|
|
||||||
class XMLPacket(_Packet):
|
class XMLPacket(_Packet):
|
||||||
|
@ -94,7 +94,7 @@ class Spheniscidae:
|
|||||||
parsed_data = data.split('%')[1:-1]
|
parsed_data = data.split('%')[1:-1]
|
||||||
|
|
||||||
packet_id = parsed_data[2]
|
packet_id = parsed_data[2]
|
||||||
packet = XTPacket(packet_id)
|
packet = XTPacket(packet_id, ext=parsed_data[1])
|
||||||
|
|
||||||
if packet in self.server.xt_listeners:
|
if packet in self.server.xt_listeners:
|
||||||
xt_listeners = self.server.xt_listeners[packet]
|
xt_listeners = self.server.xt_listeners[packet]
|
||||||
|
Loading…
Reference in New Issue
Block a user