gamespy_query 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gamespy_query/base.rb +4 -0
- data/lib/gamespy_query/parser.rb +1 -5
- data/lib/gamespy_query/version.rb +1 -1
- metadata +1 -1
data/lib/gamespy_query/base.rb
CHANGED
@@ -68,6 +68,10 @@ BackTrace: #{e.backtrace.join(CHAR_N) unless !e.respond_to?(:backtrace) || e.bac
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
def clean_string(str)
|
72
|
+
str.encode("UTF-8", invalid: :replace, undef: :replace)
|
73
|
+
end
|
74
|
+
|
71
75
|
def handle_chr(number)
|
72
76
|
number = ((number % 256)+256) if number < 0
|
73
77
|
number = number % 256 if number > 255
|
data/lib/gamespy_query/parser.rb
CHANGED
@@ -86,11 +86,7 @@ module GamespyQuery
|
|
86
86
|
get_string(packet)
|
87
87
|
end
|
88
88
|
|
89
|
-
|
90
|
-
str.encode("UTF-8", invalid: :replace, undef: :replace)
|
91
|
-
end
|
92
|
-
|
93
|
-
def parse_game_data(packet)
|
89
|
+
def parse_game_data(packet)
|
94
90
|
Tools.debug {"Game Parsing #{packet.inspect}"}
|
95
91
|
|
96
92
|
key = nil
|