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

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