def parse_battleye_value(key: str, value: str) -> bool | int | str:
    """Parses a BattlEye config value."""

    if key == 'RConPort':
        return int(value)

    if key == 'RestrictRCon':
        return bool(int(value))

    return value