minestat 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +9 -0
- data/lib/minestat.rb +5 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b38d0dd34f12f5f015fc90bb3c07f0cb11ccc975e915f33c8cf3834d0299c989
|
4
|
+
data.tar.gz: 457f958e402011590eb518e25cab6c7c5464ede26d08dad2bc18c953e1ea94a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6964cc3a53ca8b1365f824f5f53336da7554fd646ed8de50c76a83a1e5784261c9969c2bea9c8ac1699b9b82c2a73edef8e6766c1e3012b50591afa82596651a
|
7
|
+
data.tar.gz: 9204a211820b5a95da29e5ce64330153831a19976d45b43ff6eb8414c052aa80c0db646d9c37d2e92ac49d8b79b67af4ef57be2965431930856e24c26b081b3a
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 3.0.4 (March 25, 2024)
|
2
|
+
- Fixed typo
|
3
|
+
|
4
|
+
## 3.0.3 (November 2, 2023)
|
5
|
+
- Fixed empty MotD issue
|
6
|
+
|
7
|
+
## 3.0.2 (February 20, 2023)
|
8
|
+
- Added field (srv_succeeded) to indicate whether DNS SRV resolution was successful
|
9
|
+
|
1
10
|
## 3.0.1 (February 5, 2023)
|
2
11
|
- Added configurable DNS SRV resolution
|
3
12
|
- Added request type that attempts all SLP protocols
|
data/lib/minestat.rb
CHANGED
@@ -27,7 +27,7 @@ require 'timeout'
|
|
27
27
|
# Provides a Ruby interface for polling the status of Minecraft servers
|
28
28
|
class MineStat
|
29
29
|
# MineStat version
|
30
|
-
VERSION = "3.0.
|
30
|
+
VERSION = "3.0.3"
|
31
31
|
|
32
32
|
# Number of values expected from server
|
33
33
|
NUM_FIELDS = 6
|
@@ -170,7 +170,7 @@ class MineStat
|
|
170
170
|
@srv_succeeded = false # SRV resolution successful?
|
171
171
|
|
172
172
|
@try_all = true if request_type == Request::NONE
|
173
|
-
@
|
173
|
+
@srv_succeeded = resolve_srv() if @srv_enabled
|
174
174
|
set_connection_status(attempt_protocols(request_type))
|
175
175
|
end
|
176
176
|
|
@@ -255,7 +255,8 @@ class MineStat
|
|
255
255
|
# Strips message of the day formatting characters
|
256
256
|
def strip_motd()
|
257
257
|
unless @motd['text'] == nil
|
258
|
-
@
|
258
|
+
@motd = @motd['text']
|
259
|
+
@stripped_motd = @motd
|
259
260
|
else
|
260
261
|
@stripped_motd = @motd
|
261
262
|
end
|
@@ -784,7 +785,7 @@ class MineStat
|
|
784
785
|
challenge_token = @server.recv(QUERY_HANDSHAKE_SIZE)[QUERY_HANDSHAKE_OFFSET..-1]
|
785
786
|
payload = "\xFE\xFD\x00\x0B\x03\x03\x0F".force_encoding('ASCII-8BIT')
|
786
787
|
# Use the full stat below by stripping the null terminator from the challenge token and padding the end
|
787
|
-
# of the payload
|
788
|
+
# of the payload with "\x00\x00\x00\x00". The basic stat response does not include the server version.
|
788
789
|
payload += [challenge_token.rstrip.to_i].pack('l>').force_encoding('ASCII-8BIT')
|
789
790
|
payload += "\x00\x00\x00\x00".force_encoding('ASCII-8BIT')
|
790
791
|
@server.write(payload)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minestat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lloyd Dilley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: MineStat polls Minecraft server data such as version, motd, current players,
|
14
14
|
and max players.
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
|
-
rubygems_version: 3.3.
|
49
|
+
rubygems_version: 3.3.15
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Minecraft server status checker
|