diff --git a/BSO.Launcher.csproj b/BSO.Launcher.csproj
index b6639a2..944f443 100644
--- a/BSO.Launcher.csproj
+++ b/BSO.Launcher.csproj
@@ -8,7 +8,7 @@
enable
BSO.Launcher
BSO-Launcher
- 0.1.1
+ 0.2.0
MBM.wtf
BSO Launcher
BSO Launcher - Bus Simulator Online
diff --git a/MainForm.cs b/MainForm.cs
index 27124e6..001883d 100644
--- a/MainForm.cs
+++ b/MainForm.cs
@@ -19,9 +19,9 @@ public sealed class MainForm : Form
readonly Settings settings = Settings.Load();
/// Befehle, die nur einmal gleichzeitig laufen duerfen (Downloads/Installationen/Start).
- static readonly HashSet Exclusive = new() { "installMod", "launch", "installLauncherUpdate", "uninstall" };
+ static readonly HashSet Exclusive = new() { "installMod", "launch", "join", "installLauncherUpdate", "uninstall" };
readonly HashSet running = new();
- static readonly HashSet QuietCommands = new() { "window", "status", "me", "init", "releases" };
+ static readonly HashSet QuietCommands = new() { "window", "status", "me", "init", "releases", "servers" };
bool updateInstalled;
static readonly JsonSerializerOptions Json = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase };
@@ -288,6 +288,18 @@ public sealed class MainForm : Form
return await InstallMod();
case "launch":
return await Launch();
+ case "servers":
+ return await ServerList();
+ case "join":
+ {
+ // Beitreten: Server merken, beim Start automatisch verbinden, Spiel starten
+ string address = Arg(args, "address").Trim();
+ if (address.Length == 0 || address.Length > 260) throw new Exception("Ungueltige Serveradresse");
+ settings.Server = address;
+ settings.AutoConnect = true;
+ settings.Save();
+ return await Launch();
+ }
case "releases":
{
var r = await Api.Releases();
@@ -363,6 +375,21 @@ public sealed class MainForm : Form
};
}
+ /// Serverliste der Website, jeder Server direkt angefragt (Ping, aktuelle Spielerzahl). Nicht erreichbar = ohne Ping.
+ static async Task