Skip to content

Commit

Permalink
/server public/private should persist across restart (Thanks SpicyCo…
Browse files Browse the repository at this point in the history
…mbo)
  • Loading branch information
UnknownShadow200 committed Feb 16, 2021
1 parent 625ac0a commit 845cfe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion MCGalaxy/Commands/Maintenance/CmdServer.cs
Expand Up @@ -48,12 +48,14 @@ public sealed class CmdServer : Command2 {
Server.Config.Public = true;
p.Message("Server is now public!");
Logger.Log(LogType.SystemActivity, "Server is now public!");
SrvProperties.Save();
}

void SetPrivate(Player p, string[] args) {
Server.Config.Public = false;
Server.Config.Public = false;
p.Message("Server is now private!");
Logger.Log(LogType.SystemActivity, "Server is now private!");
SrvProperties.Save();
}

void DoReload(Player p, string[] args) {
Expand Down
2 changes: 1 addition & 1 deletion MCGalaxy/Network/BaseWebSocket.cs
Expand Up @@ -250,7 +250,7 @@ public abstract class ServerWebSocket : BaseWebSocket {

/// <summary> Wraps the given data in a websocket frame </summary>
protected static byte[] WrapData(byte[] data) {
int headerLen = 2 + (data.Length >= 126 ? 2 : 0);
int headerLen = data.Length >= 126 ? 4 : 2;
byte[] packet = new byte[headerLen + data.Length];
packet[0] = OPCODE_BINARY | FIN;

Expand Down

0 comments on commit 845cfe8

Please sign in to comment.