BytexDigital / BytexDigital.BattlEye.Rcon

A simple to use RCON library for BattlEye
Apache License 2.0
11 stars 9 forks source link

GetPlayersRequest always return an empty list #5

Closed Braendstrup closed 3 years ago

RednecksRevenge commented 4 years ago

can confirm

RyanTT commented 4 years ago

Hi,

I am unable to recreate this issue, are you running the command like this?


            bool requestSuccess = networkClient.Fetch(
                command: new GetPlayersRequest(),
                timeout: 5000,
                result: out List<Player> onlinePlayers);```
NeutraleNull commented 4 years ago

yes and i can also confirm the problem

NeutraleNull commented 4 years ago

I tracked the problem down to the regex expression in https://github.com/BytexDigital/BytexDigital.BattlEye.Rcon/blob/e78efb7a6ae03074181634037c9252e181ec3561/BytexDigital.BattlEye.Rcon/Commands/GetPlayersRequest.cs#L26 Trying to figure out what exactly is leading to no matches found.

RednecksRevenge commented 4 years ago

(\d+) *(\d*\.\d*\.\d*\.\d*):(\d*) *(\d+) *(\S{32})\((\S+)\) (?:(.+) (\(Lobby\))|(.+)) In the regex you are currently using you are only checking the first digits of the ip from 1 to unlimited and the other ones from 0-9. With this one you check all digits from 0-unlimited.

RyanTT commented 4 years ago

Applied a fix based on #6 which I merged from dev into master as version https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.3-beta.1 with #7 . Please provide feedback whether this fixed your issue entirely.

NeutraleNull commented 4 years ago

The is in lobby detection is not working as intended. It always returns true.

RyanTT commented 4 years ago

Addressed the issue, please try version https://www.nuget.org/packages/BytexDigital.BattlEye.Rcon/1.0.3-beta.2

NeutraleNull commented 4 years ago

Works for me so far.

Braendstrup commented 3 years ago

I can confirm, it seems to work now