protected static function ctcpQuote($message)
    {
        // First comes low-level quoting.
        $quoting = array(
            "\000"  => "\0200",
            "\n"    => "\020n",
            "\r"    => "\020r",
            "\020"  => "\020\020",
        );
        $message = strtr($message, $quoting);

        // Next some CTCP-level quoting and we're done.
        $quoting = array(
            "\001"  => "\\a",
            "\\"    => "\\\\",
        );
        $message = strtr($message, $quoting);
        return $message;
    }