aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server/ChatBackend.cs
diff options
context:
space:
mode:
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)
{