aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Server
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-05-04 19:01:03 -0600
committerAShifter <[email protected]>2017-05-04 19:01:03 -0600
commit13b35b32c2c429e6bd2d7b41ca43cc62f305dbc5 (patch)
treedbc42661444f813cf04f7af2fdfecb94d5b78044 /ShiftOS.Server
parent2fede89938014129cf50d66d5ff62af1bde4a477 (diff)
parenta57b5855f5a2b7e5f89e411a5cbe66dd0dcb50d6 (diff)
downloadshiftos_thereturn-13b35b32c2c429e6bd2d7b41ca43cc62f305dbc5.tar.gz
shiftos_thereturn-13b35b32c2c429e6bd2d7b41ca43cc62f305dbc5.tar.bz2
shiftos_thereturn-13b35b32c2c429e6bd2d7b41ca43cc62f305dbc5.zip
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
Diffstat (limited to 'ShiftOS.Server')
-rw-r--r--ShiftOS.Server/Core.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/ShiftOS.Server/Core.cs b/ShiftOS.Server/Core.cs
index e14ca27..7bb5b1d 100644
--- a/ShiftOS.Server/Core.cs
+++ b/ShiftOS.Server/Core.cs
@@ -38,6 +38,37 @@ namespace ShiftOS.Server
{
public static class Core
{
+ [MudRequest("mud_forward", typeof(ServerMessage))]
+ public static void ForwardMessage(string guid, ServerMessage message)
+ {
+ if (message.GUID == "all")
+ {
+ Server.Program.server.DispatchAll(new NetObject("forward", new ServerMessage
+ {
+ Name = "forward",
+ GUID = "Server",
+ Contents = JsonConvert.SerializeObject(message)
+ }));
+ }
+ else
+ {
+ try
+ {
+ Server.Program.server.DispatchTo(new Guid(message.GUID), new NetObject("forward", new ServerMessage
+ {
+ Name = "forward",
+ GUID = "Server",
+ Contents = JsonConvert.SerializeObject(message)
+ }));
+ }
+ catch
+ {
+
+ }
+ }
+ }
+
+
[MudRequest("getguid_reply", typeof(string))]
public static void GuidBounce(string guid, object contents)
{