Switch namespace back to App

This commit is contained in:
Lance Pioch
2024-03-12 22:39:16 -04:00
parent f0489f677b
commit c83dd86a41
837 changed files with 3421 additions and 6605 deletions

View File

@ -1,7 +1,6 @@
APP_ENV=testing
APP_DEBUG=true
APP_KEY=SomeRandomString3232RandomString
APP_THEME=pterodactyl
APP_TIMEZONE=UTC
APP_URL=http://localhost/
APP_ENVIRONMENT_ONLY=true

View File

@ -1,63 +0,0 @@
# Local Development
Pterodactyl is now powered by React, Typescript, and Tailwindcss using webpack at its core to generate compiled assets.
Release versions of Pterodactyl will include pre-compiled, minified, and hashed assets ready-to-go.
However, if you are interested in running custom themes or making modifications to the React files you'll need a build
system in place to generate these compiled assets. To get your environment setup you'll need at minimum:
* [Node.js](https://nodejs.org/en/) v14.x.x
* [Yarn](https://classic.yarnpkg.com/lang/en/) v1.x.x
* [Go](https://golang.org/) 1.17.x
### Install Dependencies
```bash
yarn install
```
The command above will download all of the dependencies necessary to get Pterodactyl assets building. After that, its as
simple as running the command below to generate assets while you're developing. Until you've run this command at least
once you'll likely see a 500 error on your Panel about a missing `manifest.json` file. This is generated by the commands
below.
```bash
# Build the compiled set of assets for development.
yarn run build
# Build the assets automatically as they are changed. This allows you to refresh
# the page and see the changes immediately.
yarn run watch
```
### Hot Module Reloading
For more advanced users, we also support 'Hot Module Reloading', allowing you to quickly see changes you're making
to the Vue template files without having to reload the page you're on. To Get started with this, you just need
to run the command below.
```bash
PUBLIC_PATH=http://192.168.1.1:8080 yarn run serve --host 192.168.1.1
```
There are two _very important_ parts of this command to take note of and change for your specific environment. The first
is the `--host` flag, which is required and should point to the machine where the `webpack-serve` server will be running.
The second is the `PUBLIC_PATH` environment variable which is the URL pointing to the HMR server and is appended to all of
the asset URLs used in Pterodactyl.
#### Development Environment
If you're using the [`pterodactyl/development`](https://github.com/pterodactyl/development) environments, which are
highly recommended, you can just run `yarn run serve` to run the HMR server, no additional configuration is necessary.
### Building for Production
Once you have your files squared away and ready for the live server, you'll be needing to generate compiled, minified,
and hashed assets to push live. To do so, run the command below:
```bash
yarn run build:production
```
This will generate a production JS bundle and associated assets, all located in `public/assets/` which will need to
be uploaded to your server or CDN for clients to use.
### Running Wings
To run `wings` in development all you need to do is set up the configuration file as normal when adding a new node, and
then you can build and run a local version of Wings by executing `make debug` in the Wings code directory. This must
be run on a Linux VM of some sort, you cannot run this locally on macOS or Windows.

File diff suppressed because it is too large Load Diff

View File

@ -1,74 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at support@pterodactyl.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@ -1,31 +0,0 @@
# Contributing
Pterodactyl does not accept Pull Requests (PRs) _for new functionality_ from users that are not currently part of the
core project team. It has become overwhelming to try and give the proper time and attention that such complicated PRs
tend to require — and deserve. As a result, it is in the project's best interest to limit the scope of work on
new functionality to work done within the core project team.
PRs that address existing _bugs_ with a corresponding issue opened in our issue tracker will continue to be accepted
and reviewed. Their scope is often significantly more targeted, and simply improving upon existing and well defined
logic.
### Responsible Disclosure
This is a fairly in-depth project and makes use of a lot of parts. We strive to keep everything as secure as possible
and welcome you to take a look at the code provided in this project yourself. We do ask that you be considerate of
others who are using the software and not publicly disclose security issues without contacting us first by email.
We'll make a deal with you: if you contact us by email, and we fail to respond to you within a week you are welcome to
publicly disclose whatever issue you have found. We understand how frustrating it is when you find something big and
no one will respond to you. This holds us to a standard of providing prompt attention to any issues that arise and
keeping this community safe.
If you've found what you believe is a security issue please email `matthew@pterodactyl.io`. Please check
[SECURITY.md](/SECURITY.md) for additional details.
### Contact Us
You can find us in a couple places online. First and foremost, we're active right here on GitHub. If you encounter a
bug or other problems, open an issue on here for us to take a look at it. We also accept feature requests here as well.
You can also find us on [Discord](https://discord.gg/pterodactyl).

View File

@ -1,7 +1,7 @@
# Stage 0:
# Build the assets that are needed for the frontend. This build stage is then discarded
# since we won't need NodeJS anymore in the future. This Docker image ships a final production
# level distribution of Pterodactyl.
# level distribution
FROM --platform=$TARGETOS/$TARGETARCH mhart/alpine-node:14
WORKDIR /app
COPY . ./

View File

@ -1,24 +0,0 @@
# The MIT License (MIT)
```
Pterodactyl®
Copyright © Dane Everitt <dane@daneeveritt.com> and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

View File

@ -1,70 +0,0 @@
[![Logo Image](https://cdn.pterodactyl.io/logos/new/pterodactyl_logo.png)](https://pterodactyl.io)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/pterodactyl/panel/ci.yaml?label=Tests&style=for-the-badge&branch=1.0-develop)
![Discord](https://img.shields.io/discord/122900397965705216?label=Discord&logo=Discord&logoColor=white&style=for-the-badge)
![GitHub Releases](https://img.shields.io/github/downloads/pterodactyl/panel/latest/total?style=for-the-badge)
![GitHub contributors](https://img.shields.io/github/contributors/pterodactyl/panel?style=for-the-badge)
# Pterodactyl Panel
Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security
in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive
UI to end users.
Stop settling for less. Make game servers a first class citizen on your platform.
![Image](https://cdn.pterodactyl.io/site-assets/pterodactyl_v1_demo.gif)
## Documentation
* [Panel Documentation](https://pterodactyl.io/panel/1.0/getting_started.html)
* [Wings Documentation](https://pterodactyl.io/wings/1.0/installing.html)
* [Community Guides](https://pterodactyl.io/community/about.html)
* Or, get additional help [via Discord](https://discord.gg/pterodactyl)
## Sponsors
I would like to extend my sincere thanks to the following sponsors for helping fund Pterodactyl's development.
[Interested in becoming a sponsor?](https://github.com/sponsors/matthewpi)
| Company | About |
|-----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [**Aussie Server Hosts**](https://aussieserverhosts.com/) | No frills Australian Owned and operated High Performance Server hosting for some of the most demanding games serving Australia and New Zealand. |
| [**BisectHosting**](https://www.bisecthosting.com/) | BisectHosting provides Minecraft, Valheim and other server hosting services with the highest reliability and lightning fast support since 2012. |
| [**MineStrator**](https://minestrator.com/) | Looking for the most highend French hosting company for your minecraft server? More than 24,000 members on our discord trust us. Give us a try! |
| [**VibeGAMES**](https://vibegames.net/) | VibeGAMES is a game server provider that specializes in DDOS protection for the games we offer. We have multiple locations in the US, Brazil, France, Germany, Singapore, Australia and South Africa. |
### Supported Games
Pterodactyl supports a wide variety of games by utilizing Docker containers to isolate each instance. This gives
you the power to run game servers without bloating machines with a host of additional dependencies.
Some of our core supported games include:
* Minecraft — including Paper, Sponge, Bungeecord, Waterfall, and more
* Rust
* Terraria
* Teamspeak
* Mumble
* Team Fortress 2
* Counter Strike: Global Offensive
* Garry's Mod
* ARK: Survival Evolved
In addition to our standard nest of supported games, our community is constantly pushing the limits of this software
and there are plenty more games available provided by the community. Some of these games include:
* Factorio
* San Andreas: MP
* Pocketmine MP
* Squad
* Xonotic
* Starmade
* Discord ATLBot, and most other Node.js/Python discord bots
* [and many more...](https://github.com/parkervcp/eggs)
## License
Pterodactyl® Copyright © 2015 - 2022 Dane Everitt and contributors.
Code released under the [MIT License](./LICENSE.md).

View File

@ -1,20 +0,0 @@
# Security Policy
## Supported Versions
The following versions of Pterodactyl are receiving active support and maintenance. Any security vulnerabilities discovered must be reproducible in supported versions.
| Panel | Daemon | Supported |
|--------|--------------|--------------------|
| 1.10.x | wings@1.7.x | :white_check_mark: |
| 1.11.x | wings@1.11.x | :white_check_mark: |
| 0.7.x | daemon@0.6.x | :x: |
## Reporting a Vulnerability
Please reach out directly to any project team member on Discord when reporting a security vulnerability, or you can email `matthew@pterodactyl.io`.
We make every effort to respond as soon as possible, although it may take a day or two for us to sync internally and determine the severity of the report and its impact. Please, _do not_ use a public facing channel or GitHub issues to report sensitive security issues.
As part of our process, we will create a security advisory for the affected versions and disclose it publicly, usually two to four weeks after a releasing a version that addresses it.

View File

@ -1,10 +1,10 @@
<?php
namespace Pterodactyl\Console\Commands\Environment;
namespace App\Console\Commands\Environment;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel;
use Pterodactyl\Traits\Commands\EnvironmentWriterTrait;
use App\Traits\Commands\EnvironmentWriterTrait;
class AppSettingsCommand extends Command
{
@ -59,7 +59,7 @@ class AppSettingsCommand extends Command
/**
* Handle command execution.
*
* @throws \Pterodactyl\Exceptions\PterodactylException
* @throws \App\Exceptions\PanelException
*/
public function handle(): int
{
@ -70,7 +70,7 @@ class AppSettingsCommand extends Command
$this->output->comment('Provide the email address that eggs exported by this Panel should be from. This should be a valid email address.');
$this->variables['APP_SERVICE_AUTHOR'] = $this->option('author') ?? $this->ask(
'Egg Author Email',
config('pterodactyl.service.author', 'unknown@unknown.com')
config('panel.service.author', 'unknown@unknown.com')
);
if (!filter_var($this->variables['APP_SERVICE_AUTHOR'], FILTER_VALIDATE_EMAIL)) {
@ -119,10 +119,10 @@ class AppSettingsCommand extends Command
$this->variables['APP_ENVIRONMENT_ONLY'] = $this->confirm('Enable UI based settings editor?', true) ? 'false' : 'true';
}
$this->output->comment('Please reference https://pterodactyl.io/panel/1.0/additional_configuration.html#telemetry for more detailed information regarding telemetry data and collection.');
$this->variables['PTERODACTYL_TELEMETRY_ENABLED'] = $this->option('telemetry') ?? $this->confirm(
$this->output->comment('Please reference our website for more detailed information regarding telemetry data and collection.');
$this->variables['PANEL_TELEMETRY_ENABLED'] = $this->option('telemetry') ?? $this->confirm(
'Enable sending anonymous telemetry data?',
config('pterodactyl.telemetry.enabled', true)
config('panel.telemetry.enabled', true)
) ? 'true' : 'false';
// Make sure session cookies are set as "secure" when using HTTPS

View File

@ -1,11 +1,11 @@
<?php
namespace Pterodactyl\Console\Commands\Environment;
namespace App\Console\Commands\Environment;
use Illuminate\Console\Command;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Database\DatabaseManager;
use Pterodactyl\Traits\Commands\EnvironmentWriterTrait;
use App\Traits\Commands\EnvironmentWriterTrait;
class DatabaseSettingsCommand extends Command
{
@ -32,8 +32,6 @@ class DatabaseSettingsCommand extends Command
/**
* Handle command execution.
*
* @throws \Pterodactyl\Exceptions\PterodactylException
*/
public function handle(): int
{
@ -56,7 +54,7 @@ class DatabaseSettingsCommand extends Command
$this->output->note('Using the "root" account for MySQL connections is not only highly frowned upon, it is also not allowed by this application. You\'ll need to have created a MySQL user for this software.');
$this->variables['DB_USERNAME'] = $this->option('username') ?? $this->ask(
'Database Username',
config('database.connections.mysql.username', 'pterodactyl')
config('database.connections.mysql.username', 'panel')
);
$askForMySQLPassword = true;
@ -76,7 +74,7 @@ class DatabaseSettingsCommand extends Command
$this->output->error('Your connection credentials have NOT been saved. You will need to provide valid connection information before proceeding.');
if ($this->confirm('Go back and try again?')) {
$this->database->disconnect('_pterodactyl_command_test');
$this->database->disconnect('_panel_command_test');
return $this->handle();
}
@ -96,7 +94,7 @@ class DatabaseSettingsCommand extends Command
*/
private function testMySQLConnection()
{
config()->set('database.connections._pterodactyl_command_test', [
config()->set('database.connections._panel_command_test', [
'driver' => 'mysql',
'host' => $this->variables['DB_HOST'],
'port' => $this->variables['DB_PORT'],
@ -108,6 +106,6 @@ class DatabaseSettingsCommand extends Command
'strict' => true,
]);
$this->database->connection('_pterodactyl_command_test')->getPdo();
$this->database->connection('_panel_command_test')->getPdo();
}
}

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands\Environment;
namespace App\Console\Commands\Environment;
use Illuminate\Console\Command;
use Pterodactyl\Traits\Commands\EnvironmentWriterTrait;
use App\Traits\Commands\EnvironmentWriterTrait;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
class EmailSettingsCommand extends Command
@ -36,7 +36,7 @@ class EmailSettingsCommand extends Command
/**
* Handle command execution.
*
* @throws \Pterodactyl\Exceptions\PterodactylException
* @throws \App\Exceptions\PanelException
*/
public function handle()
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands;
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Pterodactyl\Services\Helpers\SoftwareVersionService;
use App\Services\Helpers\SoftwareVersionService;
use Illuminate\Contracts\Config\Repository as ConfigRepository;
class InfoCommand extends Command
@ -30,7 +30,7 @@ class InfoCommand extends Command
['Panel Version', $this->config->get('app.version')],
['Latest Version', $this->versionService->getPanel()],
['Up-to-Date', $this->versionService->isLatestPanel() ? 'Yes' : $this->formatText('No', 'bg=red')],
['Unique Identifier', $this->config->get('pterodactyl.service.author')],
['Unique Identifier', $this->config->get('panel.service.author')],
], 'compact');
$this->output->title('Application Configuration');

View File

@ -1,11 +1,11 @@
<?php
namespace Pterodactyl\Console\Commands\Location;
namespace App\Console\Commands\Location;
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Pterodactyl\Services\Locations\LocationDeletionService;
use Pterodactyl\Contracts\Repository\LocationRepositoryInterface;
use App\Services\Locations\LocationDeletionService;
use App\Contracts\Repository\LocationRepositoryInterface;
class DeleteLocationCommand extends Command
{
@ -28,8 +28,8 @@ class DeleteLocationCommand extends Command
/**
* Respond to the command request.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \Pterodactyl\Exceptions\Service\Location\HasActiveNodesException
* @throws \App\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Service\Location\HasActiveNodesException
*/
public function handle()
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands\Location;
namespace App\Console\Commands\Location;
use Illuminate\Console\Command;
use Pterodactyl\Services\Locations\LocationCreationService;
use App\Services\Locations\LocationCreationService;
class MakeLocationCommand extends Command
{
@ -24,7 +24,7 @@ class MakeLocationCommand extends Command
/**
* Handle the command execution process.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function handle()
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Console\Commands\Maintenance;
namespace App\Console\Commands\Maintenance;
use Carbon\Carbon;
use Illuminate\Console\Command;

View File

@ -1,10 +1,10 @@
<?php
namespace Pterodactyl\Console\Commands\Maintenance;
namespace App\Console\Commands\Maintenance;
use Carbon\CarbonImmutable;
use Illuminate\Console\Command;
use Pterodactyl\Repositories\Eloquent\BackupRepository;
use App\Repositories\Eloquent\BackupRepository;
class PruneOrphanedBackupsCommand extends Command
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands\Node;
namespace App\Console\Commands\Node;
use Illuminate\Console\Command;
use Pterodactyl\Services\Nodes\NodeCreationService;
use App\Services\Nodes\NodeCreationService;
class MakeNodeCommand extends Command
{
@ -21,8 +21,8 @@ class MakeNodeCommand extends Command
{--maxDisk= : Set the max disk amount.}
{--overallocateDisk= : Enter the amount of disk to overallocate (% or -1 to overallocate the maximum).}
{--uploadSize= : Enter the maximum upload filesize.}
{--daemonListeningPort= : Enter the wings listening port.}
{--daemonSFTPPort= : Enter the wings SFTP listening port.}
{--daemonListeningPort= : Enter the daemon listening port.}
{--daemonSFTPPort= : Enter the daemon SFTP listening port.}
{--daemonBase= : Enter the base folder.}';
protected $description = 'Creates a new node on the system via the CLI.';
@ -38,7 +38,7 @@ class MakeNodeCommand extends Command
/**
* Handle the command execution process.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function handle()
{
@ -59,9 +59,9 @@ class MakeNodeCommand extends Command
$data['disk'] = $this->option('maxDisk') ?? $this->ask('Enter the maximum amount of disk space');
$data['disk_overallocate'] = $this->option('overallocateDisk') ?? $this->ask('Enter the amount of memory to over allocate by, -1 will disable checking and 0 will prevent creating new server');
$data['upload_size'] = $this->option('uploadSize') ?? $this->ask('Enter the maximum filesize upload', '100');
$data['daemonListen'] = $this->option('daemonListeningPort') ?? $this->ask('Enter the wings listening port', '8080');
$data['daemonSFTP'] = $this->option('daemonSFTPPort') ?? $this->ask('Enter the wings SFTP listening port', '2022');
$data['daemonBase'] = $this->option('daemonBase') ?? $this->ask('Enter the base folder', '/var/lib/pterodactyl/volumes');
$data['daemonListen'] = $this->option('daemonListeningPort') ?? $this->ask('Enter the daemon listening port', '8080');
$data['daemonSFTP'] = $this->option('daemonSFTPPort') ?? $this->ask('Enter the daemon SFTP listening port', '2022');
$data['daemonBase'] = $this->option('daemonBase') ?? $this->ask('Enter the base folder', '/var/lib/panel/volumes');
$node = $this->creationService->handle($data);
$this->line('Successfully created a new node on the location ' . $data['location_id'] . ' with the name ' . $data['name'] . ' and has an id of ' . $node->id . '.');

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Console\Commands\Node;
namespace App\Console\Commands\Node;
use Pterodactyl\Models\Node;
use App\Models\Node;
use Illuminate\Console\Command;
class NodeConfigurationCommand extends Command
@ -17,7 +17,7 @@ class NodeConfigurationCommand extends Command
{
$column = ctype_digit((string) $this->argument('node')) ? 'id' : 'uuid';
/** @var \Pterodactyl\Models\Node $node */
/** @var \App\Models\Node $node */
$node = Node::query()->where($column, $this->argument('node'))->firstOr(function () {
$this->error('The selected node does not exist.');

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Console\Commands\Node;
namespace App\Console\Commands\Node;
use Pterodactyl\Models\Node;
use App\Models\Node;
use Illuminate\Console\Command;
class NodeListCommand extends Command

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Console\Commands\Overrides;
namespace App\Console\Commands\Overrides;
use Illuminate\Foundation\Console\KeyGenerateCommand as BaseKeyGenerateCommand;

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Console\Commands\Overrides;
namespace App\Console\Commands\Overrides;
use Pterodactyl\Console\RequiresDatabaseMigrations;
use App\Console\RequiresDatabaseMigrations;
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
class SeedCommand extends BaseSeedCommand

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Console\Commands\Overrides;
namespace App\Console\Commands\Overrides;
use Pterodactyl\Console\RequiresDatabaseMigrations;
use App\Console\RequiresDatabaseMigrations;
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
class UpCommand extends BaseUpCommand

View File

@ -1,13 +1,13 @@
<?php
namespace Pterodactyl\Console\Commands\Schedule;
namespace App\Console\Commands\Schedule;
use Exception;
use Illuminate\Console\Command;
use Pterodactyl\Models\Schedule;
use App\Models\Schedule;
use Illuminate\Support\Facades\Log;
use Illuminate\Database\Eloquent\Builder;
use Pterodactyl\Services\Schedules\ProcessScheduleService;
use App\Services\Schedules\ProcessScheduleService;
class ProcessRunnableCommand extends Command
{
@ -51,8 +51,6 @@ class ProcessRunnableCommand extends Command
* Processes a given schedule and logs and errors encountered the console output. This should
* never throw an exception out, otherwise you'll end up killing the entire run group causing
* any other schedules to not process correctly.
*
* @see https://github.com/pterodactyl/panel/issues/2609
*/
protected function processSchedule(Schedule $schedule)
{

View File

@ -1,14 +1,14 @@
<?php
namespace Pterodactyl\Console\Commands\Server;
namespace App\Console\Commands\Server;
use Pterodactyl\Models\Server;
use App\Models\Server;
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Validation\ValidationException;
use Illuminate\Validation\Factory as ValidatorFactory;
use Pterodactyl\Repositories\Wings\DaemonPowerRepository;
use Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException;
use App\Repositories\Daemon\DaemonPowerRepository;
use App\Exceptions\Http\Connection\DaemonConnectionException;
class BulkPowerActionCommand extends Command
{

View File

@ -1,14 +1,14 @@
<?php
namespace Pterodactyl\Console\Commands;
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\VarDumper\VarDumper;
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
use App\Services\Telemetry\TelemetryCollectionService;
class TelemetryCommand extends Command
{
protected $description = 'Displays all the data that would be sent to the Pterodactyl Telemetry Service if telemetry collection is enabled.';
protected $description = 'Displays all the data that would be sent to the Telemetry Service if telemetry collection is enabled.';
protected $signature = 'p:telemetry';
@ -23,7 +23,7 @@ class TelemetryCommand extends Command
/**
* Handle execution of command.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function handle()
{

View File

@ -1,28 +1,28 @@
<?php
namespace Pterodactyl\Console\Commands;
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Pterodactyl\Console\Kernel;
use App\Console\Kernel;
use Symfony\Component\Process\Process;
use Symfony\Component\Console\Helper\ProgressBar;
class UpgradeCommand extends Command
{
protected const DEFAULT_URL = 'https://github.com/pterodactyl/panel/releases/%s/panel.tar.gz';
protected const DEFAULT_URL = 'https://github.com/lancepioch/panel/releases/%s/panel.tar.gz';
protected $signature = 'p:upgrade
{--user= : The user that PHP runs under. All files will be owned by this user.}
{--group= : The group that PHP runs under. All files will be owned by this group.}
{--url= : The specific archive to download.}
{--release= : A specific Pterodactyl version to download from GitHub. Leave blank to use latest.}
{--release= : A specific version to download from GitHub. Leave blank to use latest.}
{--skip-download : If set no archive will be downloaded.}';
protected $description = 'Downloads a new archive for Pterodactyl from GitHub and then executes the normal upgrade commands.';
protected $description = 'Downloads a new archive from GitHub and then executes the normal upgrade commands.';
/**
* Executes an upgrade command which will run through all of our standard
* commands for Pterodactyl and enable users to basically just download
* Panel commands and enable users to basically just download
* the archive and execute this and be done.
*
* This places the application in maintenance mode as well while the commands
@ -133,7 +133,7 @@ class UpgradeCommand extends Command
/** @var \Illuminate\Foundation\Application $app */
$app = require __DIR__ . '/../../../bootstrap/app.php';
/** @var \Pterodactyl\Console\Kernel $kernel */
/** @var \App\Console\Kernel $kernel */
$kernel = $app->make(Kernel::class);
$kernel->bootstrap();
$this->setLaravel($app);
@ -173,7 +173,7 @@ class UpgradeCommand extends Command
});
$this->newLine(2);
$this->info('Panel has been successfully upgraded. Please ensure you also update any Wings instances: https://pterodactyl.io/wings/1.0/upgrading.html');
$this->info('Panel has been successfully upgraded. Please ensure you also update any Daemon instances');
}
protected function withProgress(ProgressBar $bar, \Closure $callback)

View File

@ -1,11 +1,11 @@
<?php
namespace Pterodactyl\Console\Commands\User;
namespace App\Console\Commands\User;
use Pterodactyl\Models\User;
use App\Models\User;
use Webmozart\Assert\Assert;
use Illuminate\Console\Command;
use Pterodactyl\Services\Users\UserDeletionService;
use App\Services\Users\UserDeletionService;
class DeleteUserCommand extends Command
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands\User;
namespace App\Console\Commands\User;
use Illuminate\Console\Command;
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
use App\Contracts\Repository\UserRepositoryInterface;
class DisableTwoFactorCommand extends Command
{
@ -22,8 +22,8 @@ class DisableTwoFactorCommand extends Command
/**
* Handle command execution process.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function handle()
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Console\Commands\User;
namespace App\Console\Commands\User;
use Illuminate\Console\Command;
use Pterodactyl\Services\Users\UserCreationService;
use App\Services\Users\UserCreationService;
class MakeUserCommand extends Command
{
@ -23,7 +23,7 @@ class MakeUserCommand extends Command
* Handle command request to create a new user.
*
* @throws \Exception
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function handle()
{

View File

@ -1,17 +1,17 @@
<?php
namespace Pterodactyl\Console;
namespace App\Console;
use Ramsey\Uuid\Uuid;
use Pterodactyl\Models\ActivityLog;
use App\Models\ActivityLog;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Database\Console\PruneCommand;
use Pterodactyl\Repositories\Eloquent\SettingsRepository;
use App\Repositories\Eloquent\SettingsRepository;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Pterodactyl\Services\Telemetry\TelemetryCollectionService;
use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand;
use Pterodactyl\Console\Commands\Maintenance\PruneOrphanedBackupsCommand;
use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
use App\Services\Telemetry\TelemetryCollectionService;
use App\Console\Commands\Schedule\ProcessRunnableCommand;
use App\Console\Commands\Maintenance\PruneOrphanedBackupsCommand;
use App\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
class Kernel extends ConsoleKernel
{
@ -44,7 +44,7 @@ class Kernel extends ConsoleKernel
$schedule->command(PruneCommand::class, ['--model' => [ActivityLog::class]])->daily();
}
if (config('pterodactyl.telemetry.enabled')) {
if (config('panel.telemetry.enabled')) {
$this->registerTelemetry($schedule);
}
}
@ -52,7 +52,7 @@ class Kernel extends ConsoleKernel
/**
* I wonder what this does.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
private function registerTelemetry(Schedule $schedule): void

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Console;
namespace App\Console;
/**
* @mixin \Illuminate\Console\Command
@ -46,7 +46,7 @@ You must run the following command to finish migrating your database:
<fg=green;options=bold>php artisan migrate --step --force</>
You will not be able to use Pterodactyl Panel as expected without fixing your
You will not be able to use the Panel as expected without fixing your
database state by running the command above.
');

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Core;
namespace App\Contracts\Core;
use Pterodactyl\Events\Event;
use App\Events\Event;
interface ReceivesEvents
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Contracts\Criteria;
namespace App\Contracts\Criteria;
use Illuminate\Database\Eloquent\Model;
use Pterodactyl\Repositories\Repository;
use App\Repositories\Repository;
interface CriteriaInterface
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Extensions;
namespace App\Contracts\Extensions;
use Hashids\HashidsInterface as VendorHashidsInterface;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Http;
namespace App\Contracts\Http;
interface ClientPermissionsRequest
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Allocation;
use App\Models\Allocation;
interface AllocationRepositoryInterface extends RepositoryInterface
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\User;
use App\Models\User;
use Illuminate\Support\Collection;
interface ApiKeyRepositoryInterface extends RepositoryInterface

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
interface ApiPermissionRepositoryInterface extends RepositoryInterface
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Illuminate\Support\Collection;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Egg;
use App\Models\Egg;
use Illuminate\Database\Eloquent\Collection;
interface EggRepositoryInterface extends RepositoryInterface
@ -10,7 +10,7 @@ interface EggRepositoryInterface extends RepositoryInterface
/**
* Return an egg with the variables relation attached.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithVariables(int $id): Egg;
@ -27,7 +27,7 @@ interface EggRepositoryInterface extends RepositoryInterface
/**
* Return all the data needed to export a service.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithExportAttributes(int $id): Egg;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Illuminate\Support\Collection;

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Location;
use App\Models\Location;
use Illuminate\Support\Collection;
interface LocationRepositoryInterface extends RepositoryInterface
@ -20,14 +20,14 @@ interface LocationRepositoryInterface extends RepositoryInterface
/**
* Return all the nodes and their respective count of servers for a location.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodes(int $id): Location;
/**
* Return a location and the count of nodes in that location.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithNodeCount(int $id): Location;
}

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Nest;
use App\Models\Nest;
use Illuminate\Database\Eloquent\Collection;
interface NestRepositoryInterface extends RepositoryInterface
@ -10,21 +10,21 @@ interface NestRepositoryInterface extends RepositoryInterface
/**
* Return a nest or all nests with their associated eggs and variables.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithEggs(int $id = null): Collection|Nest;
/**
* Return a nest or all nests and the count of eggs and servers for that nest.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithCounts(int $id = null): Collection|Nest;
/**
* Return a nest along with its associated eggs and the servers relation on those eggs.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithEggServers(int $id): Nest;
}

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Node;
use App\Models\Node;
use Illuminate\Support\Collection;
interface NodeRepositoryInterface extends RepositoryInterface

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
interface PermissionRepositoryInterface extends RepositoryInterface
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Model;
@ -54,14 +54,14 @@ interface RepositoryInterface
/**
* Create a new model instance and persist it to the database.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function create(array $fields, bool $validate = true, bool $force = false): mixed;
/**
* Find a model that has the specific ID passed.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function find(int $id): mixed;
@ -73,7 +73,7 @@ interface RepositoryInterface
/**
* Find and return the first matching instance for the given fields.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function findFirstWhere(array $fields): mixed;
@ -95,8 +95,8 @@ interface RepositoryInterface
/**
* Update a given ID with the passed array of fields.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function update(int $id, array $fields, bool $validate = true, bool $force = false): mixed;
@ -109,7 +109,7 @@ interface RepositoryInterface
/**
* Update a record if it exists in the database, otherwise create it.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Model\DataValidationException
*/
public function updateOrCreate(array $where, array $fields, bool $validate = true, bool $force = false): mixed;

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Schedule;
use App\Models\Schedule;
use Illuminate\Support\Collection;
interface ScheduleRepositoryInterface extends RepositoryInterface
@ -15,7 +15,7 @@ interface ScheduleRepositoryInterface extends RepositoryInterface
/**
* Return a schedule model with all the associated tasks as a relationship.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getScheduleWithTasks(int $schedule): Schedule;
}

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Server;
use App\Models\Server;
use Illuminate\Support\Collection;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
@ -26,7 +26,7 @@ interface ServerRepositoryInterface extends RepositoryInterface
/**
* Return a server model and all variables associated with the server.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function findWithVariables(int $id): Server;
@ -57,7 +57,7 @@ interface ServerRepositoryInterface extends RepositoryInterface
/**
* Return a server by UUID.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getByUuid(string $uuid): Server;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
interface ServerVariableRepositoryInterface extends RepositoryInterface
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Illuminate\Support\Collection;

View File

@ -1,14 +1,14 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
interface SettingsRepositoryInterface extends RepositoryInterface
{
/**
* Store a new persistent setting in the database.
*
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Model\DataValidationException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function set(string $key, string $value = null);

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Subuser;
use App\Models\Subuser;
interface SubuserRepositoryInterface extends RepositoryInterface
{
@ -19,7 +19,7 @@ interface SubuserRepositoryInterface extends RepositoryInterface
/**
* Return a subuser and associated permissions given a user_id and server_id.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getWithPermissionsUsingUserAndServer(int $user, int $server): Subuser;
}

View File

@ -1,15 +1,15 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
use Pterodactyl\Models\Task;
use App\Models\Task;
interface TaskRepositoryInterface extends RepositoryInterface
{
/**
* Get a task and the server relationship for that task.
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \App\Exceptions\Repository\RecordNotFoundException
*/
public function getTaskForJobProcess(int $id): Task;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Contracts\Repository;
namespace App\Contracts\Repository;
interface UserRepositoryInterface extends RepositoryInterface
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events;
namespace App\Events;
use Illuminate\Support\Str;
use Pterodactyl\Models\ActivityLog;
use App\Models\ActivityLog;
use Illuminate\Database\Eloquent\Model;
class ActivityLogged extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Auth;
namespace App\Events\Auth;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
class DirectLogin extends Event
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Events\Auth;
namespace App\Events\Auth;
use Pterodactyl\Events\Event;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class FailedCaptcha extends Event

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Events\Auth;
namespace App\Events\Auth;
use Pterodactyl\Events\Event;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class FailedPasswordReset extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Auth;
namespace App\Events\Auth;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
class ProvidedAuthenticationToken extends Event
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Events;
namespace App\Events;
abstract class Event
{

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Created extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Creating extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Deleted extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Deleting extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Installed extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Saved extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Saving extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Updated extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Server;
namespace App\Events\Server;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Server;
use App\Events\Event;
use App\Models\Server;
use Illuminate\Queue\SerializesModels;
class Updating extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Subuser;
namespace App\Events\Subuser;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Subuser;
use App\Events\Event;
use App\Models\Subuser;
use Illuminate\Queue\SerializesModels;
class Created extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Subuser;
namespace App\Events\Subuser;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Subuser;
use App\Events\Event;
use App\Models\Subuser;
use Illuminate\Queue\SerializesModels;
class Creating extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Subuser;
namespace App\Events\Subuser;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Subuser;
use App\Events\Event;
use App\Models\Subuser;
use Illuminate\Queue\SerializesModels;
class Deleted extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\Subuser;
namespace App\Events\Subuser;
use Pterodactyl\Events\Event;
use Pterodactyl\Models\Subuser;
use App\Events\Event;
use App\Models\Subuser;
use Illuminate\Queue\SerializesModels;
class Deleting extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\User;
namespace App\Events\User;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class Created extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\User;
namespace App\Events\User;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class Creating extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\User;
namespace App\Events\User;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class Deleted extends Event

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Events\User;
namespace App\Events\User;
use Pterodactyl\Models\User;
use Pterodactyl\Events\Event;
use App\Models\User;
use App\Events\Event;
use Illuminate\Queue\SerializesModels;
class Deleting extends Event

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions;
namespace App\Exceptions;
class AccountNotFoundException extends \Exception
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions;
namespace App\Exceptions;
class AutoDeploymentException extends \Exception
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions;
namespace App\Exceptions;
use Exception;
use Illuminate\Http\Request;
@ -12,7 +12,7 @@ use Illuminate\Http\RedirectResponse;
use Prologue\Alerts\AlertsMessageBag;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class DisplayException extends PterodactylException implements HttpExceptionInterface
class DisplayException extends PanelException implements HttpExceptionInterface
{
public const LEVEL_DEBUG = 'debug';
public const LEVEL_INFO = 'info';

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions;
namespace App\Exceptions;
use Exception;
use Illuminate\Support\Arr;
@ -19,7 +19,7 @@ use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\Mailer\Exception\TransportException;
use Pterodactyl\Exceptions\Repository\RecordNotFoundException;
use App\Exceptions\Repository\RecordNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
@ -30,7 +30,7 @@ class Handler extends ExceptionHandler
* resulting in some weird rule names. This string will be parsed out and
* replaced with 'p_' in the response code.
*/
private const PTERODACTYL_RULE_STRING = 'pterodactyl\_rules\_';
private const PANEL_RULE_STRING = 'App\_rules\_';
/**
* A list of the exception types that should not be reported.
@ -132,8 +132,6 @@ class Handler extends ExceptionHandler
// This is kind of a hack, and ideally things like this should be handled as
// much as possible at the code level, but there are a lot of spots that do a
// ton of actions and were written before this bug discovery was made.
//
// @see https://github.com/pterodactyl/panel/pull/1468
if ($connections->transactionLevel()) {
$connections->rollBack(0);
}
@ -163,7 +161,7 @@ class Handler extends ExceptionHandler
foreach ($errors as $key => $error) {
$meta = [
'source_field' => $field,
'rule' => str_replace(self::PTERODACTYL_RULE_STRING, 'p_', Arr::get(
'rule' => str_replace(self::PANEL_RULE_STRING, 'p_', Arr::get(
$codes,
str_replace('.', '_', $field) . '.' . $key
)),

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Http\Base;
namespace App\Exceptions\Http\Base;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
class InvalidPasswordProvidedException extends DisplayException
{

View File

@ -1,11 +1,11 @@
<?php
namespace Pterodactyl\Exceptions\Http\Connection;
namespace App\Exceptions\Http\Connection;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Exception\GuzzleException;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
/**
* @method \GuzzleHttp\Exception\GuzzleException getPrevious()
@ -15,7 +15,7 @@ class DaemonConnectionException extends DisplayException
private int $statusCode = Response::HTTP_GATEWAY_TIMEOUT;
/**
* Every request to the Wings instance will return a unique X-Request-Id header
* Every request to the daemon instance will return a unique X-Request-Id header
* which allows for all errors to be efficiently tied to a specific request that
* triggered them, and gives users a more direct method of informing hosts when
* something goes wrong.
@ -33,7 +33,7 @@ class DaemonConnectionException extends DisplayException
if ($useStatusCode) {
$this->statusCode = is_null($response) ? $this->statusCode : $response->getStatusCode();
// There are rare conditions where wings encounters a panic condition and crashes the
// There are rare conditions where daemon encounters a panic condition and crashes the
// request being made after content has already been sent over the wire. In these cases
// you can end up with a "successful" response code that is actual an error.
//

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions\Http;
namespace App\Exceptions\Http;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Http\Server;
namespace App\Exceptions\Http\Server;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
class FileSizeTooLargeException extends DisplayException
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Http\Server;
namespace App\Exceptions\Http\Server;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
class FileTypeNotEditableException extends DisplayException
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Http\Server;
namespace App\Exceptions\Http\Server;
use Pterodactyl\Models\Server;
use App\Models\Server;
use Symfony\Component\HttpKernel\Exception\ConflictHttpException;
class ServerStateConflictException extends ConflictHttpException

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions\Http;
namespace App\Exceptions\Http;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpException;

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions;
namespace App\Exceptions;
use Spatie\Ignition\Contracts\Solution;
use Spatie\Ignition\Contracts\ProvidesSolution;

View File

@ -1,15 +1,15 @@
<?php
namespace Pterodactyl\Exceptions\Model;
namespace App\Exceptions\Model;
use Illuminate\Support\MessageBag;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Validation\Validator;
use Pterodactyl\Exceptions\PterodactylException;
use App\Exceptions\PanelException;
use Illuminate\Contracts\Support\MessageProvider;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class DataValidationException extends PterodactylException implements HttpExceptionInterface, MessageProvider
class DataValidationException extends PanelException implements HttpExceptionInterface, MessageProvider
{
/**
* DataValidationException constructor.

View File

@ -0,0 +1,7 @@
<?php
namespace App\Exceptions;
class PanelException extends \Exception
{
}

View File

@ -1,7 +0,0 @@
<?php
namespace Pterodactyl\Exceptions;
class PterodactylException extends \Exception
{
}

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Repository\Daemon;
namespace App\Exceptions\Repository\Daemon;
use Pterodactyl\Exceptions\Repository\RepositoryException;
use App\Exceptions\Repository\RepositoryException;
class InvalidPowerSignalException extends RepositoryException
{

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Repository;
namespace App\Exceptions\Repository;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
class DuplicateDatabaseNameException extends DisplayException
{

View File

@ -1,6 +1,6 @@
<?php
namespace Pterodactyl\Exceptions\Repository;
namespace App\Exceptions\Repository;
use Illuminate\Http\Response;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Exceptions\Repository;
namespace App\Exceptions\Repository;
use Pterodactyl\Exceptions\PterodactylException;
use App\Exceptions\PanelException;
class RepositoryException extends PterodactylException
class RepositoryException extends PanelException
{
}

View File

@ -1,9 +1,9 @@
<?php
namespace Pterodactyl\Exceptions\Service\Allocation;
namespace App\Exceptions\Service\Allocation;
use Pterodactyl\Exceptions\PterodactylException;
use App\Exceptions\PanelException;
class AllocationDoesNotBelongToServerException extends PterodactylException
class AllocationDoesNotBelongToServerException extends PanelException
{
}

View File

@ -1,8 +1,8 @@
<?php
namespace Pterodactyl\Exceptions\Service\Allocation;
namespace App\Exceptions\Service\Allocation;
use Pterodactyl\Exceptions\DisplayException;
use App\Exceptions\DisplayException;
class AutoAllocationNotEnabledException extends DisplayException
{

Some files were not shown because too many files have changed in this diff Show More