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.
 

17 lines
488 B

import logging
from paircd.client import Client
from paircd.message import Message
from paircd.server import Server
async def handle_user(server: Server, client: Client, msg: Message) -> None:
if client.registered:
raise RuntimeError("USER command issued after registration")
client.username = msg.args[0]
client.realname = msg.args[3]
if client.nickname:
client.registered = True
logging.info(f"{client.hostname} ({client.id()}) registered")