palworld_rcon 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +3 -5
- data/lib/palworld_rcon/client.rb +21 -1
- data/lib/palworld_rcon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea6a34916bb20565e148c29507b9eeebbac568c22ac38542118e722c73646e2d
|
4
|
+
data.tar.gz: 5fb29be482bf73fc1fe7e08a7acc3606fd4d80974c7c9ca83b848095f58a5b4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b780d1bf6bab20ddc3cf106128f01ec4e8a2109ae747a6614c2693527edc4ecca643850d3907d81f28634b0f3dfdb0a7b2760683573ed98013ff96abf101afea
|
7
|
+
data.tar.gz: 331db935cd591f7dd0ce2c9a2e0107f124a756676d4cb5fad20f4aca1b54fe95edf1ea337bea6ad10f55b014ba18084599da3bb7fdbd08fc0cdd83a47af953f4
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
# PalworldRcon
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/palworld_rcon`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
A ruby Palworld RCON client.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
7
|
Install the gem and add to the application's Gemfile by executing:
|
10
8
|
|
11
|
-
$ bundle add
|
9
|
+
$ bundle add palworld_rcon
|
12
10
|
|
13
11
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
14
12
|
|
15
|
-
$ gem install
|
13
|
+
$ gem install palworld_rcon
|
16
14
|
|
17
15
|
## Usage
|
18
16
|
|
data/lib/palworld_rcon/client.rb
CHANGED
@@ -12,7 +12,7 @@ module PalworldRcon
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def broadcast(message)
|
15
|
-
cmd = "Broadcast #{message}"
|
15
|
+
cmd = "Broadcast #{process_message(message)}"
|
16
16
|
execute_command(cmd)
|
17
17
|
end
|
18
18
|
|
@@ -30,6 +30,22 @@ module PalworldRcon
|
|
30
30
|
execute_command("ShowPlayers")
|
31
31
|
end
|
32
32
|
|
33
|
+
def shutdown(count_down, message)
|
34
|
+
execute_command("Shutdown #{count_down} #{process_message(message)}")
|
35
|
+
end
|
36
|
+
|
37
|
+
def save
|
38
|
+
execute_command("Save")
|
39
|
+
end
|
40
|
+
|
41
|
+
def server_info
|
42
|
+
execute_command("Info")
|
43
|
+
end
|
44
|
+
|
45
|
+
def do_exit
|
46
|
+
execute_command("DoExit")
|
47
|
+
end
|
48
|
+
|
33
49
|
private
|
34
50
|
|
35
51
|
def execute_command(cmd)
|
@@ -38,6 +54,10 @@ module PalworldRcon
|
|
38
54
|
raise ExectueCommandError, e.message
|
39
55
|
end
|
40
56
|
|
57
|
+
def process_message(message)
|
58
|
+
message.gsub(" ", "_")
|
59
|
+
end
|
60
|
+
|
41
61
|
attr_reader :rcon_client
|
42
62
|
end
|
43
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: palworld_rcon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uooobarry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rconrb
|