mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
hybrid: various cleanup
This commit is contained in:
parent
c636e064e7
commit
c974ee9b44
@ -15,9 +15,7 @@ class HybridProtocol(TS6Protocol):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
self.casemapping = 'ascii'
|
self.casemapping = 'ascii'
|
||||||
self.caps = {}
|
|
||||||
self.hook_map = {'EOB': 'ENDBURST', 'TBURST': 'TOPIC', 'SJOIN': 'JOIN'}
|
self.hook_map = {'EOB': 'ENDBURST', 'TBURST': 'TOPIC', 'SJOIN': 'JOIN'}
|
||||||
self.protocol_caps -= {'slash-in-hosts'}
|
|
||||||
|
|
||||||
def post_connect(self):
|
def post_connect(self):
|
||||||
"""Initializes a connection to a server."""
|
"""Initializes a connection to a server."""
|
||||||
@ -175,14 +173,11 @@ class HybridProtocol(TS6Protocol):
|
|||||||
# We only get a list of keywords here. Hybrid obviously assumes that
|
# We only get a list of keywords here. Hybrid obviously assumes that
|
||||||
# we know what modes it supports (indeed, this is a standard list).
|
# we know what modes it supports (indeed, this is a standard list).
|
||||||
# <- CAPAB :UNDLN UNKLN KLN TBURST KNOCK ENCAP DLN IE EX HOPS CHW SVS CLUSTER EOB QS
|
# <- CAPAB :UNDLN UNKLN KLN TBURST KNOCK ENCAP DLN IE EX HOPS CHW SVS CLUSTER EOB QS
|
||||||
self.caps = caps = args[0].split()
|
self._caps = caps = args[0].split()
|
||||||
for required_cap in ('SVS', 'EOB', 'HOPS', 'QS', 'TBURST'):
|
for required_cap in ('SVS', 'EOB', 'HOPS', 'QS', 'TBURST'):
|
||||||
if required_cap not in caps:
|
if required_cap not in caps:
|
||||||
raise ProtocolError('%s not found in TS6 capabilities list; this is required! (got %r)' % (required_cap, caps))
|
raise ProtocolError('%s not found in TS6 capabilities list; this is required! (got %r)' % (required_cap, caps))
|
||||||
|
|
||||||
log.debug('(%s) self.connected set!', self.name)
|
|
||||||
self.connected.set()
|
|
||||||
|
|
||||||
def handle_uid(self, numeric, command, args):
|
def handle_uid(self, numeric, command, args):
|
||||||
"""
|
"""
|
||||||
Handles Hybrid-style UID commands (user introduction). This is INCOMPATIBLE
|
Handles Hybrid-style UID commands (user introduction). This is INCOMPATIBLE
|
||||||
@ -278,7 +273,7 @@ class HybridProtocol(TS6Protocol):
|
|||||||
|
|
||||||
# Propagate the hostmask change as a hook.
|
# Propagate the hostmask change as a hook.
|
||||||
self.call_hooks([numeric, 'CHGHOST',
|
self.call_hooks([numeric, 'CHGHOST',
|
||||||
{'target': target, 'newhost': host}])
|
{'target': target, 'newhost': host}])
|
||||||
|
|
||||||
parsedmodes.remove(modepair)
|
parsedmodes.remove(modepair)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user