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

GoldSrc servers can't fetch rules and players #14

Open
Herover opened this issue Jun 19, 2020 · 0 comments
Open

GoldSrc servers can't fetch rules and players #14

Herover opened this issue Jun 19, 2020 · 0 comments
Labels

Comments

@Herover
Copy link
Owner

Herover commented Jun 19, 2020

My theory is that challenge packets are not parsed correctly.
The following will print some warnings related to getServerInfo done in initialize, but getRules and getPlayers will fail because we keep getting challenge packets.

  const server = new SourceServer('185.236.8.19:27015'); // Some cstrike server
  server.setTimeout(2000);
  try {
    // Set up connection
    await server.initialize();

    const info = await server.getServerInfo();
    console.log(info);

    const rules = await server.getRules();
    console.log(rules);

    const players = await server.getPlayers();
    console.log(players);
  } catch (e) {
    console.error(e);
  } finally {
    // Remember to disconnect
    await server.disconnect();
  }
@Herover Herover added the bug label Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant