Skip to content

Commit

Permalink
Add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanae6 committed Jun 18, 2022
1 parent 1f5ea97 commit dd3f65f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Super Mario Odyssey: Online Server

The official server for the [Super Mario Odyssey: Online](https://github.com/CraftyBoss/SuperMarioOdysseyOnline) mod.


## Windows Setup
1. Download latest build from [Releases](https://github.com/Sanae6/SmoOnlineServer/releases)
2. Run `SMO.Server.exe`
3. `settings.json` is autogenerated in step 2, modify it however you'd like.

## Building (Mac/Linux Setup)

Must have the [.NET 6 SDK](https://dotnet.microsoft.com/en-us/download) and Git installed.
Run these commands in your shell:
```shell
git clone https://github.com/Sanae6/SmoOnlineServer
cd SmoOnlineServer
# replace run with build to only build the server
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`


## Commands

Run `help` to get what commands are available in the server console.
Run the `loadsettings` command in the console to update the settings without restarting.
Server address and port will require a server restart, but everything else should update when you run `loadsettings`.

[//]: # (TODO: Document all commands, possibly rename them too.)
3 changes: 1 addition & 2 deletions Server/DiscordBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ await DiscordClient.SendMessageAsync(LogChannel,
$"Console log:```{Logger.PrefixNewLines(text, $"{level} [{source}]")}```");
}
} catch (Exception e) {
// don't log again, it'll just stack overflow the server!
await Console.Error.WriteLineAsync("Exception in discord logger");
await Console.Error.WriteLineAsync(e.ToString());
}
Expand All @@ -63,8 +64,6 @@ public async void Run() {
string mentionPrefix = $"{DiscordClient.CurrentUser.Mention} ";
DiscordClient.MessageCreated += async (_, args) => {
DiscordMessage msg = args.Message;
Console.WriteLine(
$"{msg.Content} {DiscordClient.CurrentUser.Mention} {msg.Content.StartsWith(mentionPrefix)}");
if (msg.Content.StartsWith(Prefix)) {
await msg.Channel.TriggerTypingAsync();
await msg.RespondAsync(string.Join('\n',
Expand Down
3 changes: 3 additions & 0 deletions SmoMultiplayerServer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{CE222C1F-FBCE-4690-BD14-B7D6290A473E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External Items", "External Items", "{38C80331-521C-4097-8652-4DF384E5B9C1}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down

0 comments on commit dd3f65f

Please sign in to comment.