Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteamPlayer class does not contain check for HLTV #283

Open
voed opened this issue Nov 10, 2015 · 3 comments
Open

SteamPlayer class does not contain check for HLTV #283

voed opened this issue Nov 10, 2015 · 3 comments

Comments

@voed
Copy link

voed commented Nov 10, 2015

In GoldSrc server(dont know about Source, maybe too), HLTV info in status looks like this:
img
The loss field is empty and its causes crash when its parsing.
My workaround: add isHLTV method same as isBot and check for it before parsing loss.

    public boolean isHLTV()
    {
        return this.steamId.equals("HLTV");
    }
if(!this.isBot() && !this.isHLTV()) {
this.loss  = Integer.parseInt(playerData.get("loss"));
this.ping  = Integer.parseInt(playerData.get("ping"));
...
@koraktor
Copy link
Owner

Sounds like a good improvement.

Would you like to create a pull request for koraktor/steam-condenser-java?

@voed
Copy link
Author

voed commented Nov 10, 2015

Yea, done. But i think catching parse exceptions and adding full HLTV support would be better. Maybe i will do it later.

koraktor added a commit to koraktor/steam-condenser-java that referenced this issue Nov 12, 2015
@koraktor
Copy link
Owner

Thanks.
By the way, SourceTV uses the BOT ID, so this is already covered.

@koraktor koraktor added this to the 2.0.0 milestone Mar 7, 2016
@koraktor koraktor self-assigned this Mar 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants