aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/ChatBackend.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-12 18:39:41 -0500
committerMichael <[email protected]>2017-02-12 18:39:41 -0500
commitf5f4dcbdb58829707ecbc7ecc20ffdae8c656457 (patch)
tree9de3cac57d0cee7c66ce7d7731b9a1bddcbf46d9 /ShiftOS.Server/ChatBackend.cs
parentf54f01494101f931b8987e64a65f7bc8f2314d09 (diff)
downloadshiftos_thereturn-f5f4dcbdb58829707ecbc7ecc20ffdae8c656457.tar.gz
shiftos_thereturn-f5f4dcbdb58829707ecbc7ecc20ffdae8c656457.tar.bz2
shiftos_thereturn-f5f4dcbdb58829707ecbc7ecc20ffdae8c656457.zip
chat_getall MUD command
Diffstat (limited to 'ShiftOS.Server/ChatBackend.cs')
-rw-r--r--ShiftOS.Server/ChatBackend.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/ShiftOS.Server/ChatBackend.cs b/ShiftOS.Server/ChatBackend.cs
index f3d1dee..6779fd8 100644
--- a/ShiftOS.Server/ChatBackend.cs
+++ b/ShiftOS.Server/ChatBackend.cs
@@ -102,6 +102,17 @@ namespace ShiftOS.Server
public delegate void empty();
+ [MudRequest("chat_getallchannels")]
+ public static void GetAllChannels(string guid, object contents)
+ {
+ server.DispatchTo(new Guid(guid), new NetObject("chat_all", new ServerMessage
+ {
+ Name = "chat_all",
+ GUID = "Server",
+ Contents = (File.Exists("chats.json") == true) ? File.ReadAllText("chats.json") : "[]"
+ }));
+ }
+
[MudRequest("chat_send")]
public static void ReceiveMessage(string guid, object contents)
{