3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

Start work on protocol capabilities (#337)

This commit is contained in:
James Lu 2017-03-15 23:32:47 -07:00
parent 61cf48c37c
commit 2ca0cf05a0
2 changed files with 8 additions and 0 deletions

View File

@ -1377,6 +1377,9 @@ class Protocol():
self.conf_keys = {'ip', 'port', 'hostname', 'sid', 'sidrange', 'protocol', 'sendpass',
'recvpass'}
# Defines a set of PyLink protocol capabilities
self.protocol_caps = set()
def validateServerConf(self):
"""Validates that the server block given contains the required keys."""
for k in self.conf_keys:

View File

@ -9,6 +9,11 @@ from pylinkirc.log import log
class IRCS2SProtocol(Protocol):
def __init__(self, irc):
super().__init__(irc)
self.protocol_caps = {'can-spawn-clients', 'has-ts', 'can-host-relay',
'can-track-servers'}
def checkCollision(self, nick):
"""
Nick collision checker.