mirror of
https://github.com/iio612/DEFENDER.git
synced 2026-02-13 19:24:23 +00:00
Update all Protocol calls
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
from typing import Literal, TYPE_CHECKING
|
||||
from .protocols.unreal6 import Unrealircd6
|
||||
from .protocols.inspircd import Inspircd
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from core.irc import Irc
|
||||
|
||||
class Protocol:
|
||||
|
||||
def __init__(self, protocol: Literal['unreal6'], ircInstance: 'Irc'):
|
||||
def __init__(self, protocol: Literal['unreal6','inspircd'], ircInstance: 'Irc'):
|
||||
|
||||
self.Protocol = None
|
||||
if protocol == 'unreal6':
|
||||
self.Protocol: Unrealircd6 = Unrealircd6(ircInstance)
|
||||
elif protocol == 'inspircd': # InspIRCd
|
||||
self.Protocol: Inspircd = Inspircd(ircInstance)
|
||||
else:
|
||||
self.Protocol = None
|
||||
Reference in New Issue
Block a user