FragLand/minestat

1.16.4 Query fails (Ruby)

Chew opened this issue · 3 comments

Chew commented

Expected behavior

I expected it to say, "Online."

Actual behavior/symptoms

>> Server.first.query.online
=> false

Steps to reproduce behavior/symptoms

ms = MineStat.new("test.geysermc.org", 19132)
ms.online # => false

The server is online; see https://mcsrvstat.us/server/test.geysermc.org:19132

MineStat version

minestat (0.3.0)

Programming language and compiler/interpreter version

Ruby 2.7.2

Operating system

macOS Big Sur

I suppose it's Pinging, not Querying.
Going to https://mcsrvstat.us/server/test.geysermc.org:25565 says Ping: Yes and Query: No. (This works)
Going to https://mcsrvstat.us/server/test.geysermc.org:19132 says Ping: No and Query: Yes. (Says offline)

Is this not designed for queries? It would be mega useful if it could unless I am doing it wrong. If you have an alternative that I can use, please let me know :3

Greetings, @Chew.

MineStat only supports SLP (Server List Ping) currently which is a TCP-based protocol. The query protocol is UDP based. I did mention possibly adding query support in issue #45. Unfortunately, I am unable to suggest an alternative written in Ruby as I am not aware of any offhand.

Chew commented

No problem at all. My knowledge of TCP/UDP is limited. If I could I'd figure something out and PR it. I suppose this can be closed in favor of the other issue?

The PR would certainly be appreciated. In regard to issue closure, sure -- this issue is now referenced in #45. I'll close this one and we'll continue our discussion in Discord. :)