six-updater-web 0.23.3 → 0.23.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.
- data/Rakefile +1 -1
- data/lib/six-updater-web/app/controllers/main_controller.rb +9 -13
- data/lib/six-updater-web/app/models/queryserver.rb +1 -1
- data/lib/six-updater-web/app/models/repository.rb +4 -2
- data/lib/six-updater-web/app/models/sixconfig.rb +1 -1
- data/lib/six-updater-web/config/six-updater-web.rb +1 -1
- metadata +2 -2
data/Rakefile
CHANGED
@@ -91,7 +91,7 @@ class MainController < ApplicationController
|
|
91
91
|
end
|
92
92
|
|
93
93
|
if gslist_installed
|
94
|
-
@msg << "
|
94
|
+
@msg << "<b>A window should open displaying the gamespy progress</b>"
|
95
95
|
if gs_geo
|
96
96
|
@system_setting.update_gamespy #(true)
|
97
97
|
else
|
@@ -112,12 +112,10 @@ class MainController < ApplicationController
|
|
112
112
|
|
113
113
|
when "purge_gamespy"
|
114
114
|
d = false
|
115
|
-
if params["really"]
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
d = true
|
120
|
-
end
|
115
|
+
if params["really"] && params["really"]["sure"] == "1"
|
116
|
+
Queryserver.purge
|
117
|
+
@msg << "Purged Gamespy..."
|
118
|
+
d = true
|
121
119
|
end
|
122
120
|
@error << "<b>ERROR: Please confirm by checking the checkbox</b>" if !d
|
123
121
|
end
|
@@ -207,12 +205,10 @@ class MainController < ApplicationController
|
|
207
205
|
@system_setting.save
|
208
206
|
end
|
209
207
|
|
210
|
-
if grab
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
preset.mods += Mod.find(:all)
|
215
|
-
end
|
208
|
+
if grab && params["all"]
|
209
|
+
preset = Sixconfig.new
|
210
|
+
preset.name = "Dynamic"
|
211
|
+
preset.mods += Mod.find(:all)
|
216
212
|
end
|
217
213
|
|
218
214
|
if preset
|
@@ -17,7 +17,7 @@ class Queryserver < ActiveRecord::Base
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def export_to_preset
|
20
|
-
cfg = Sixconfig.new(:name => "CUST - #{self.name} clone", :mods => self.mods)
|
20
|
+
cfg = Sixconfig.new(:name => "CUST - #{self.name} clone", :mods => self.mods.reject {|e| e.new_record? })
|
21
21
|
cfg.save
|
22
22
|
cfg
|
23
23
|
end
|
@@ -4,6 +4,8 @@ class Repository < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
attr_accessor :ping_value
|
6
6
|
|
7
|
+
PING_PACKET_SIZE = 1400
|
8
|
+
|
7
9
|
def self.rank(pr = false)
|
8
10
|
repos = self.find(:all)
|
9
11
|
repos.each do |rep|
|
@@ -22,7 +24,7 @@ class Repository < ActiveRecord::Base
|
|
22
24
|
|
23
25
|
def ping!
|
24
26
|
logger.info "Handling #{self.address}"
|
25
|
-
out = %x[ping -n 10 #{self.address}]
|
27
|
+
out = %x[ping -n 10 -f -l #{PING_PACKET_SIZE} #{self.address}]
|
26
28
|
vals = []
|
27
29
|
out.each_line do |l|
|
28
30
|
l[/=([0-9]*)ms/]
|
@@ -37,7 +39,7 @@ class Repository < ActiveRecord::Base
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def ping
|
40
|
-
SixUpdaterWeb.run_program("ping", SixUpdaterWeb::BASE_PATH, "-r 9 -n 30 -t #{self.address}")
|
42
|
+
SixUpdaterWeb.run_program("ping", SixUpdaterWeb::BASE_PATH, "-f -l #{PING_PACKET_SIZE} -r 9 -n 30 -t #{self.address}")
|
41
43
|
end
|
42
44
|
|
43
45
|
def tracert
|
@@ -31,7 +31,7 @@ class Sixconfig < ActiveRecord::Base
|
|
31
31
|
m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
|
32
32
|
ms = []
|
33
33
|
m.each {|mod| ms += mod.all_dependentmods; ms << mod }
|
34
|
-
ms.uniq
|
34
|
+
ms.uniq.reject{|e| e.class == Mod} # Shitty workaround for crap input (Wrong type mods...)
|
35
35
|
end
|
36
36
|
|
37
37
|
def exec
|