|
|
@ -4,11 +4,7 @@ import logging |
|
|
|
import os |
|
|
|
|
|
|
|
from paircd.client import Client |
|
|
|
from paircd.handle import handle_cmd, register_cmd_handler |
|
|
|
from paircd.handler.join import handle_join |
|
|
|
from paircd.handler.nick import handle_nick |
|
|
|
from paircd.handler.privmsg import handle_privmsg |
|
|
|
from paircd.handler.user import handle_user |
|
|
|
from paircd.handlers import handle_cmd, register_cmd_handlers |
|
|
|
from paircd.message import parse_message |
|
|
|
from paircd.server import Server |
|
|
|
|
|
|
@ -30,12 +26,8 @@ async def main() -> None: |
|
|
|
bind_addr = os.getenv("BIND_ADDR") or "0.0.0.0" |
|
|
|
port = os.getenv("PORT") or 6667 |
|
|
|
|
|
|
|
register_cmd_handler("JOIN", 1, handle_join) |
|
|
|
register_cmd_handler("NICK", 1, handle_nick) |
|
|
|
register_cmd_handler("PRIVMSG", 2, handle_privmsg) |
|
|
|
register_cmd_handler("USER", 4, handle_user) |
|
|
|
|
|
|
|
irc_server = Server() |
|
|
|
register_cmd_handlers() |
|
|
|
|
|
|
|
async def register_client(reader: StreamReader, writer: StreamWriter) -> None: |
|
|
|
client = Client( |
|
|
|