python ircd using asyncio
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

19 lines
467 B

from abc import abstractmethod, ABC
from typing import Optional
from paircd.client import Client
from paircd.message import Message
from paircd.server import Server
class CommandHandler(ABC):
cmd: str
argc: Optional[int]
def __init__(self, cmd: str, argc: Optional[int] = None) -> None:
self.cmd = cmd
self.argc = argc
@abstractmethod
async def handle(self, server: Server, client: Client, msg: Message) -> None:
pass