Esempio n. 1
0
def quit(context, message=""):
    """Quit the bot from IRC."""

    cli = context.client

    if cli is None or cli.socket.fileno() < 0:
        plog("Socket is already closed. Exiting.")
        raise SystemExit

    with cli:
        cli.send("QUIT :{0}".format(message))
Esempio n. 2
0
def quit(context, message=""):
    """Quit the bot from IRC."""

    cli = context.client

    if cli is None or cli.socket.fileno() < 0:
        plog("Socket is already closed. Exiting.")
        raise SystemExit

    with cli:
        cli.send("QUIT :{0}".format(message))