diff --git a/ProjectLighthouse.sln.DotSettings b/ProjectLighthouse.sln.DotSettings
index 2ffd35fb..cb12010b 100644
--- a/ProjectLighthouse.sln.DotSettings
+++ b/ProjectLighthouse.sln.DotSettings
@@ -3,6 +3,7 @@
<Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="aaBb" /></Policy>
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
<Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" />
+ True
True
True
True
diff --git a/ProjectLighthouse/Controllers/MessageController.cs b/ProjectLighthouse/Controllers/MessageController.cs
index b060c88f..7bb18f05 100644
--- a/ProjectLighthouse/Controllers/MessageController.cs
+++ b/ProjectLighthouse/Controllers/MessageController.cs
@@ -1,6 +1,7 @@
using System.IO;
using System.Threading.Tasks;
using Kettu;
+using LBPUnion.ProjectLighthouse.Helpers;
using LBPUnion.ProjectLighthouse.Logging;
using LBPUnion.ProjectLighthouse.Types;
using Microsoft.AspNetCore.Mvc;
@@ -18,9 +19,11 @@ namespace LBPUnion.ProjectLighthouse.Controllers {
[HttpGet("eula")]
public async Task Eula() {
User user = await this.database.UserFromRequest(this.Request);
- return user == null ? this.StatusCode(403, "") :
- this.Ok($"You are now logged in as user {user.Username} (id {user.UserId}).\n" +
- "This is a private testing instance. Please do not make anything public for now, and keep in mind security isn't as tight as a full release would.");
+ return user == null
+ ? this.StatusCode(403, "")
+ : this.Ok($"You are now logged in as user {user.Username} (id {user.UserId}).\n" +
+ (EulaHelper.ShowPrivateInstanceNotice ? "\n" + EulaHelper.PrivateInstanceNotice : "") + "\n" +
+ $"{EulaHelper.License}\n");
}
[HttpGet("announce")]
diff --git a/ProjectLighthouse/Helpers/EulaHelper.cs b/ProjectLighthouse/Helpers/EulaHelper.cs
new file mode 100644
index 00000000..25c531ba
--- /dev/null
+++ b/ProjectLighthouse/Helpers/EulaHelper.cs
@@ -0,0 +1,22 @@
+namespace LBPUnion.ProjectLighthouse.Helpers {
+ public static class EulaHelper {
+ public const string License = @"
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as
+published by the Free Software Foundation, either version 3 of the
+License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program. If not, see .";
+
+ public const string PrivateInstanceNotice = @"This server is a private testing instance.
+Please do not make anything public for now, and keep in mind security isn't as tight as a full release would.";
+
+ public const bool ShowPrivateInstanceNotice = false;
+ }
+}
\ No newline at end of file