GameQ icon indicating copy to clipboard operation
GameQ copied to clipboard

Modified to show the FiveM player list

Open Erani0 opened this issue 3 years ago • 8 comments

A small change to the script to get the FiveM player list and display it with

Erani0 avatar Aug 29 '22 02:08 Erani0

Coverage Status

Coverage: 92.826% (+4.3%) from 88.533% when pulling c391800207525ab5346985e479a6a3634e06c677 on Erani0:FiveM-Player-List into 44e7906661ae90c68d77005f42cbbf151caea478 on Austinb:v3.

coveralls avatar Aug 29 '22 03:08 coveralls

Sorry about the force push thought it was better than dozens of commits. I'm really clueless why scrutinizer always outputs an error does anyone know how to fix it so that there are no problems

Erani0 avatar Aug 29 '22 04:08 Erani0

Finally scrutinizer has no more errors.

Erani0 avatar Aug 29 '22 11:08 Erani0

Please remove any comments that are not needed (i.e. preventing test code from operating).

Also, as a bigger discussion, this library was built to only use the bare minimum of requirements due to hosting and other restrictions. That being said I know some hosts will block functions to prevent abuse and other issues. The question is should an internal call to \Protocols\Http (https://github.com/Austinb/GameQ/blob/v3/src/GameQ/Protocols/Http.php) be used instead of making direct calls to file_get_contents()? This is just a thought since this solution is a shoehorn option given that the protocol this game server is using does not return the player information in a "regular" query call.

Thoughts? CC: @bumbummen99

Austinb avatar Aug 30 '22 02:08 Austinb

So the comments were already there before but it can also be removed. And yes I understand what you mean. But FiveM outputs data differently, you can query them via http then you would have to query 2 urls and evaluate or as it is now and subsequently integrate the player list as I have done now.

Erani0 avatar Aug 30 '22 08:08 Erani0

Please remove any comments that are not needed (i.e. preventing test code from operating).

Also, as a bigger discussion, this library was built to only use the bare minimum of requirements due to hosting and other restrictions. That being said I know some hosts will block functions to prevent abuse and other issues. The question is should an internal call to \Protocols\Http (https://github.com/Austinb/GameQ/blob/v3/src/GameQ/Protocols/Http.php) be used instead of making direct calls to file_get_contents()? This is just a thought since this solution is a shoehorn option given that the protocol this game server is using does not return the player information in a "regular" query call.

Thoughts? CC: @bumbummen99

How would that internal call look like?

bumbummen99 avatar Sep 02 '22 13:09 bumbummen99

You get this information from the server. http://45.131.108.130:30120/info.json

Erani0 avatar Sep 02 '22 14:09 Erani0

The inspection completed: 1 new issues, 6 updated code elements

scrutinizer-notifier avatar Oct 16 '22 02:10 scrutinizer-notifier

Should PHP 5.6 be removed from the checks? It may already have been. @bumbummen99 can you bump this so it will check again?

Austinb avatar Feb 25 '23 23:02 Austinb

The inspection completed: 1 new issues

scrutinizer-notifier avatar Feb 28 '23 08:02 scrutinizer-notifier

@Austinb It failed due to the null coalesce operator (??) that was introduced with PHP7. While i agree that we should drop support for ancient versions to encurage people to update their code and environment to a secure and supported version, i would say that this should be done with a seperate change / release so that this can be clearly communicated - we could then also introduce a lot of new PHP features in regards to types that i think would come in very handy. Edit: Also think this PR is good now :)

bumbummen99 avatar Feb 28 '23 19:02 bumbummen99

Query for FiveM , change.. A update coming ?

TrustHeberg avatar Oct 30 '23 21:10 TrustHeberg