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.

14 lines
439 B

  1. from paircd.reply import PONG
  2. from paircd.client import Client
  3. from paircd.command_handler import CommandHandler
  4. from paircd.message import Message
  5. from paircd.server import Server
  6. class PingHandler(CommandHandler):
  7. def __init__(self) -> None:
  8. super().__init__("PING", 1)
  9. async def handle(self, server: Server, client: Client, msg: Message) -> None:
  10. token = msg.args[0]
  11. client.write_message(PONG(token))