mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
ts6: modularize required capabilities
This commit is contained in:
parent
1cb320f5f4
commit
d9fdd9dfcb
@ -22,6 +22,8 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
# Track whether we've received end-of-burst from the uplink.
|
||||
self.has_eob = False
|
||||
|
||||
self.required_caps = {'EUID', 'SAVE', 'TB', 'ENCAP', 'QS', 'CHW'}
|
||||
|
||||
### OUTGOING COMMANDS
|
||||
|
||||
def spawnClient(self, nick, ident='null', host='null', realhost=None, modes=set(),
|
||||
@ -370,7 +372,7 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
# <- CAPAB :BAN CHW CLUSTER ENCAP EOPMOD EUID EX IE KLN KNOCK MLOCK QS RSFNC SAVE SERVICES TB UNKLN
|
||||
self.irc.caps = caps = args[0].split()
|
||||
|
||||
for required_cap in ('EUID', 'SAVE', 'TB', 'ENCAP', 'QS', 'CHW'):
|
||||
for required_cap in self.required_caps:
|
||||
if required_cap not in caps:
|
||||
raise ProtocolError('%s not found in TS6 capabilities list; this is required! (got %r)' % (required_cap, caps))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user