diff options
| author | Michael <[email protected]> | 2017-03-11 09:04:45 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-11 09:04:45 -0500 |
| commit | 49812bf46cb153af6bab8e2a095024da84fcc149 (patch) | |
| tree | 2f357da244276f2576089f03d65a00d8acc65c72 /ShiftOS_TheReturn/Commands.cs | |
| parent | b9c3a0e30f6a939b1e1e3142cb507dfe7993b683 (diff) | |
| download | shiftos_thereturn-49812bf46cb153af6bab8e2a095024da84fcc149.tar.gz shiftos_thereturn-49812bf46cb153af6bab8e2a095024da84fcc149.tar.bz2 shiftos_thereturn-49812bf46cb153af6bab8e2a095024da84fcc149.zip | |
Lock down various commands while offline.
Diffstat (limited to 'ShiftOS_TheReturn/Commands.cs')
| -rw-r--r-- | ShiftOS_TheReturn/Commands.cs | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs index 0ea00e5..12c371f 100644 --- a/ShiftOS_TheReturn/Commands.cs +++ b/ShiftOS_TheReturn/Commands.cs @@ -133,6 +133,7 @@ namespace ShiftOS.Engine [Namespace("mud")] public static class MUDCommands { + [MultiplayerOnly] [Command("status")] public static bool Status() { @@ -174,6 +175,7 @@ namespace ShiftOS.Engine return true; } + [MultiplayerOnly] [Command("disconnect")] [RequiresUpgrade("hacker101_deadaccts")] public static bool Disconnect() @@ -183,6 +185,7 @@ namespace ShiftOS.Engine return true; } + [MultiplayerOnly] [Command("sendmsg")] [KernelMode] [RequiresUpgrade("hacker101_deadaccts")] @@ -195,48 +198,6 @@ namespace ShiftOS.Engine } } - [RequiresUpgrade("mud_fundamentals")] - [Namespace("chat")] - public static class ChatCommands - { - [RequiresArgument("id")] - [RequiresArgument("name")] - [RequiresArgument("topic")] - [Command("create")] - public static bool CreateChat(Dictionary<string, object> args) - { - string id = ""; - string topic = ""; - string name = ""; - int max_users = 0; - - id = args["id"] as string; - name = args["topic"] as string; - topic = args["name"] as string; - - bool valid = true; - - if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(name) || string.IsNullOrEmpty(topic)) - valid = false; - - if (valid) - { - ServerManager.SendMessage("chat_create", $@"{{ - id: ""{id}"", - name: ""{name}"", - topic: ""{topic}"", - max_users: {max_users} -}}"); - } - else - { - Console.WriteLine("{CHAT_PLEASE_PROVIDE_VALID_CHANNEL_DATA}"); - } - return true; - } - - } - [TutorialLock] [Namespace("trm")] public static class TerminalCommands @@ -266,6 +227,7 @@ namespace ShiftOS.Engine } } + [MultiplayerOnly] [Namespace("dev")] public static class ShiftOSDevCommands { @@ -474,6 +436,7 @@ namespace ShiftOS.Engine return true; } + [MultiplayerOnly] [Command("save")] public static bool Save() { @@ -481,6 +444,7 @@ namespace ShiftOS.Engine return true; } + [MultiplayerOnly] [Command("status")] public static bool Status() { @@ -493,7 +457,7 @@ Upgrades: {SaveSystem.CurrentSave.CountUpgrades()} installed, } } - + [MultiplayerOnly] [Namespace("shiftorium")] public static class ShiftoriumCommands { |
