ts3query 0.4.1 → 0.4.2
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.
- data/lib/ts3query/ts3_connection.rb +5 -3
- metadata +6 -6
@@ -27,8 +27,9 @@ class TS3Connection
|
|
27
27
|
params += " #{param.keys[0]}=#{param[param.keys[0]]}"
|
28
28
|
end
|
29
29
|
|
30
|
-
@connection.cmd("String"
|
31
|
-
"Match"
|
30
|
+
@connection.cmd("String" => "#{meth}#{params}#{options}\r",
|
31
|
+
"Match" => /error id=0 msg=ok\n/,
|
32
|
+
"Timeout" => 3) { |data|
|
32
33
|
data.split("|").each do |current|
|
33
34
|
current_data = {}
|
34
35
|
current.split(" ").each do |entity|
|
@@ -51,7 +52,8 @@ class TS3Connection
|
|
51
52
|
def connect(params)
|
52
53
|
begin
|
53
54
|
@connection = Net::Telnet::new("Host" => params[:address], "Port" => params[:port])
|
54
|
-
@connection.waitfor(/TS3\n(.*)\n
|
55
|
+
@connection.waitfor("Match" => /TS3\n(.*)\n/,
|
56
|
+
"Timeout" => 3)
|
55
57
|
rescue
|
56
58
|
raise ConnectionRefused, "server not available"
|
57
59
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ts3query
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Simple TS3 Query Library to connect to the query port of a teamspeak
|
15
15
|
3 server.
|
@@ -20,15 +20,15 @@ extra_rdoc_files: []
|
|
20
20
|
files:
|
21
21
|
- lib/ts3query/ts3_connection.rb
|
22
22
|
- lib/ts3query.rb
|
23
|
+
- features/connect_to_server.feature
|
23
24
|
- features/run_command.feature
|
24
25
|
- features/support/env.rb
|
25
26
|
- features/step_definitions/run_command_steps.rb
|
26
27
|
- features/step_definitions/connection_steps.rb
|
27
|
-
- features/connect_to_server.feature
|
28
|
-
- README.rdoc
|
29
|
-
- Rakefile
|
30
28
|
- Gemfile
|
29
|
+
- Rakefile
|
31
30
|
- LICENSE.txt
|
31
|
+
- README.rdoc
|
32
32
|
- init.rb
|
33
33
|
homepage: https://github.com/tntwebsolutions/ts3query
|
34
34
|
licenses: []
|
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
version: '0'
|
51
51
|
requirements: []
|
52
52
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.8.
|
53
|
+
rubygems_version: 1.8.24
|
54
54
|
signing_key:
|
55
55
|
specification_version: 3
|
56
56
|
summary: Simple TS3 Query Library.
|