0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-29 06:33:06 +00:00
This commit is contained in:
CraftyBoss 2022-07-08 23:13:44 +00:00
commit 967a89a55b
3 changed files with 31 additions and 3 deletions

View file

@ -20,6 +20,15 @@ dotnet run --project Server/Server.csproj -c Release
``` ```
If you ran `dotnet build` instead of `dotnet run`, you can find the binary at `Server/bin/net6.0/Release/Server.exe` If you ran `dotnet build` instead of `dotnet run`, you can find the binary at `Server/bin/net6.0/Release/Server.exe`
## Running under systemd
If you have systemd, you can use the existing systemd serivce.
```shell
cp smo.serivce /etc/systemd/system/smo.service
# edit ExecStart to your path for the server executable and change WorkingDirectory to the server directory
chmod +x filepath to the server executable
systemctl enable --now smo.service
```
## Commands ## Commands

View file

@ -239,7 +239,7 @@ CommandHandler.RegisterCommand("send", args => {
} }
if (!stage.Contains("Stage") && !stage.Contains("Zone")) { if (!stage.Contains("Stage") && !stage.Contains("Zone")) {
return "Invalid Stage Name!"; return "Invalid Stage Name! ```cap -> Cap Kingdom\ncascade -> Cascade Kingdom\nsand -> Sand Kingdom\nlake -> Lake Kingdom\nwooded -> Wooded Kingdom\ncloud -> Cloud Kingdom\nlost -> Lost Kingdom\nmetro -> Metro Kingdom\nsea -> Sea Kingdom\nsnow -> Snow Kingdom\nlunch -> Luncheon Kingdom\nruined -> Ruined Kingdom\nbowser -> Bowser's Kingdom\nmoon -> Moon Kingdom\nmush -> Mushroom Kingdom\ndark -> Dark Side\ndarker -> Darker Side```";
} }
if (!sbyte.TryParse(args[2], out sbyte scenario) || scenario < -1) if (!sbyte.TryParse(args[2], out sbyte scenario) || scenario < -1)
@ -273,7 +273,7 @@ CommandHandler.RegisterCommand("sendall", args => {
} }
if (!stage.Contains("Stage") && !stage.Contains("Zone")) { if (!stage.Contains("Stage") && !stage.Contains("Zone")) {
return "Invalid Stage Name!"; return "Invalid Stage Name! ```cap -> Cap Kingdom\ncascade -> Cascade Kingdom\nsand -> Sand Kingdom\nlake -> Lake Kingdom\nwooded -> Wooded Kingdom\ncloud -> Cloud Kingdom\nlost -> Lost Kingdom\nmetro -> Metro Kingdom\nsea -> Sea Kingdom\nsnow -> Snow Kingdom\nlunch -> Luncheon Kingdom\nruined -> Ruined Kingdom\nbowser -> Bowser's Kingdom\nmoon -> Moon Kingdom\nmush -> Mushroom Kingdom\ndark -> Dark Side\ndarker -> Darker Side```";
} }
Client[] players = server.Clients.Where(c => c.Connected).ToArray(); Client[] players = server.Clients.Where(c => c.Connected).ToArray();

19
smo.service Normal file
View file

@ -0,0 +1,19 @@
[Unit]
Description="Super Mario Odyssey Multiplayer Server"
After=network.target
StartLimitIntervalSec=0
[Service]
# Uncommnt User to run under a different user
# User=user
# change ExecStart to the path of the server file
ExecStart="/home/user/SMOServer/Server"
# change WorkingDirectory to the folder of your server
WorkingDirectory=/home/user/SMOServer/
# ensure the service restarts after crashing
Restart=always
# amount of time to wait before restarting the service
RestartSec=5
[Install]
WantedBy=multi-user.target