|
23 | 23 | */ |
24 | 24 | use Pterodactyl\Models\Service; |
25 | 25 | use Pterodactyl\Models\ServiceOption; |
26 | | -use Illuminate\Support\Facades\Schema; |
27 | | -use Illuminate\Database\Schema\Blueprint; |
28 | 26 | use Illuminate\Database\Migrations\Migration; |
29 | 27 |
|
30 | 28 | class MigrateToNewServiceSystem extends Migration |
@@ -69,7 +67,7 @@ public function minecraft() |
69 | 67 | DB::transaction(function () use ($service) { |
70 | 68 | $options = ServiceOption::where('service_id', $service->id)->get(); |
71 | 69 | $options->each(function ($item) use ($options) { |
72 | | - switch($item->tag) { |
| 70 | + switch ($item->tag) { |
73 | 71 | case 'vanilla': |
74 | 72 | $item->config_startup = '{"done": ")! For help, type ", "userInteraction": [ "Go to eula.txt for more info."]}'; |
75 | 73 | $item->config_files = '{"server.properties":{"parser": "properties", "find":{"server-ip": "0.0.0.0", "enable-query": "true", "server-port": "{{server.build.default.port}}", "query.port": "{{server.build.default.port}}"}}}'; |
@@ -117,13 +115,13 @@ public function srcds() |
117 | 115 | $options->each(function ($item) use ($options) { |
118 | 116 | if ($item->tag === 'srcds' && $item->name === 'Insurgency') { |
119 | 117 | $item->tag = 'insurgency'; |
120 | | - } else if ($item->tag === 'srcds' && $item->name === 'Team Fortress 2') { |
| 118 | + } elseif ($item->tag === 'srcds' && $item->name === 'Team Fortress 2') { |
121 | 119 | $item->tag = 'tf2'; |
122 | | - } else if ($item->tag === 'srcds' && $item->name === 'Custom Source Engine Game') { |
| 120 | + } elseif ($item->tag === 'srcds' && $item->name === 'Custom Source Engine Game') { |
123 | 121 | $item->tag = 'source'; |
124 | 122 | } |
125 | 123 |
|
126 | | - switch($item->tag) { |
| 124 | + switch ($item->tag) { |
127 | 125 | case 'source': |
128 | 126 | $item->config_startup = '{"done": "Assigned anonymous gameserver", "userInteraction": []}'; |
129 | 127 | $item->config_files = '{}'; |
@@ -164,7 +162,7 @@ public function terraria() |
164 | 162 | DB::transaction(function () use ($service) { |
165 | 163 | $options = ServiceOption::where('service_id', $service->id)->get(); |
166 | 164 | $options->each(function ($item) use ($options) { |
167 | | - switch($item->tag) { |
| 165 | + switch ($item->tag) { |
168 | 166 | case 'tshock': |
169 | 167 | $item->startup = null; |
170 | 168 | $item->config_startup = '{"done": "Type \'help\' for a list of commands", "userInteraction": []}'; |
@@ -195,7 +193,7 @@ public function voice() |
195 | 193 | DB::transaction(function () use ($service) { |
196 | 194 | $options = ServiceOption::where('service_id', $service->id)->get(); |
197 | 195 | $options->each(function ($item) use ($options) { |
198 | | - switch($item->tag) { |
| 196 | + switch ($item->tag) { |
199 | 197 | case 'mumble': |
200 | 198 | $item->startup = './murmur.x86 -fg'; |
201 | 199 | $item->config_startup = '{"done": "Server listening on", "userInteraction": [ "Generating new server certificate"]}'; |
|
0 commit comments