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.

15 lines
479 B

  1. from paircd.client import Client
  2. from paircd.command_handler import CommandHandler
  3. from paircd.message import Message
  4. from paircd.server import Server
  5. class QuitHandler(CommandHandler):
  6. def __init__(self) -> None:
  7. super().__init__("QUIT")
  8. async def handle(self, server: Server, client: Client, msg: Message) -> None:
  9. quit_msg = ""
  10. if len(msg.args) == 1:
  11. quit_msg = msg.args[0]
  12. await client.quit(server, f"Quit: {quit_msg}")