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

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