QOL updates
This commit is contained in:
parent
7cb11509a1
commit
ec1f894809
4 changed files with 23 additions and 9 deletions
|
@ -48,6 +48,15 @@ void main() async {
|
||||||
settings.Write();
|
settings.Write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print("Checking ACL..");
|
||||||
|
if (settings.inst!.admins.isNotEmpty) {
|
||||||
|
print("Disabling super user...");
|
||||||
|
settings.superuser =
|
||||||
|
User.make("_disabled", "%%%disabled%%%", UserLevel.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
print("Super User is disabled because there are users registered.");
|
||||||
|
|
||||||
print("Finished installing needed DLLs");
|
print("Finished installing needed DLLs");
|
||||||
|
|
||||||
print("Checking for game server updates...");
|
print("Checking for game server updates...");
|
||||||
|
@ -63,8 +72,11 @@ void main() async {
|
||||||
print(
|
print(
|
||||||
"Aborting server startup procedure, initial server setup is not yet complete\n\n[ You must log in with the ServerManager to continue ]");
|
"Aborting server startup procedure, initial server setup is not yet complete\n\n[ You must log in with the ServerManager to continue ]");
|
||||||
|
|
||||||
DiscordHookHelper.sendWebHook(settings.inst!.discord, 0xFFD700,
|
DiscordHookHelper.sendWebHook(
|
||||||
"FTS Enabled", "First Time Setup Mode enabled. Startup Aborted");
|
settings.inst!.discord,
|
||||||
|
DiscordHookProps.INACTIVE,
|
||||||
|
"FTS Enabled",
|
||||||
|
"First Time Setup Mode enabled. Startup Aborted");
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
print("Downloading mods...");
|
print("Downloading mods...");
|
||||||
|
|
|
@ -118,6 +118,9 @@ class C2SLoginPacket implements IPacket {
|
||||||
loginReply.valid = false;
|
loginReply.valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Properly handle the disabled account
|
||||||
|
if (loginReply.valid && username == "_disabled") loginReply.valid = false;
|
||||||
|
|
||||||
if (!loginReply.valid && settings.superuser!.name != username) {
|
if (!loginReply.valid && settings.superuser!.name != username) {
|
||||||
// Check for a lower level user
|
// Check for a lower level user
|
||||||
if (settings.inst!.admins.any((T) => T.name == username)) {
|
if (settings.inst!.admins.any((T) => T.name == username)) {
|
||||||
|
|
|
@ -60,4 +60,5 @@ class DiscordHookProps {
|
||||||
static const int OFFLINE_ALERT = 8716288;
|
static const int OFFLINE_ALERT = 8716288;
|
||||||
static const int ALERT = 21893; // non-intrusive
|
static const int ALERT = 21893; // non-intrusive
|
||||||
static const int ALERT_INTRUSIVE = 6291589;
|
static const int ALERT_INTRUSIVE = 6291589;
|
||||||
|
static const int INACTIVE = 0xFFD700;
|
||||||
}
|
}
|
||||||
|
|
10
pubspec.yaml
10
pubspec.yaml
|
@ -2,7 +2,7 @@ name: servermanager
|
||||||
description: A server management program for Conan
|
description: A server management program for Conan
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
|
@ -16,10 +16,10 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.1.0+47
|
version: 1.1.0+48
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.4 <4.0.0'
|
sdk: ">=3.1.4 <4.0.0"
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
@ -31,7 +31,6 @@ dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
@ -40,7 +39,7 @@ dependencies:
|
||||||
crypto:
|
crypto:
|
||||||
libac_dart:
|
libac_dart:
|
||||||
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
|
hosted: https://git.zontreck.com/api/packages/AriasCreations/pub/
|
||||||
version: ^1.2.082924+1846
|
version: ^1.2.090324+0325
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -60,7 +59,6 @@ dev_dependencies:
|
||||||
|
|
||||||
# The following section is specific to Flutter packages.
|
# The following section is specific to Flutter packages.
|
||||||
flutter:
|
flutter:
|
||||||
|
|
||||||
# The following line ensures that the Material Icons font is
|
# The following line ensures that the Material Icons font is
|
||||||
# included with your application, so that you can use the icons in
|
# included with your application, so that you can use the icons in
|
||||||
# the material Icons class.
|
# the material Icons class.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue