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

  1. from abc import abstractmethod, ABC
  2. from typing import Optional
  3. from paircd.client import Client
  4. from paircd.message import Message
  5. from paircd.server import Server
  6. class CommandHandler(ABC):
  7. cmd: str
  8. argc: Optional[int]
  9. def __init__(self, cmd: str, argc: Optional[int] = None) -> None:
  10. self.cmd = cmd
  11. self.argc = argc
  12. @abstractmethod
  13. async def handle(self, server: Server, client: Client, msg: Message) -> None:
  14. pass