aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-03-09 10:33:44 -0500
committerMichael <[email protected]>2017-03-09 10:33:44 -0500
commitea430ac9df46cf01c8c4f8502097057a8da42600 (patch)
tree363eb08181897309e38b0865647bc1503f727264
parent02fd7a883b4592a2200c4f3e912e56bdc09bfdbc (diff)
downloadshiftos_thereturn-ea430ac9df46cf01c8c4f8502097057a8da42600.tar.gz
shiftos_thereturn-ea430ac9df46cf01c8c4f8502097057a8da42600.tar.bz2
shiftos_thereturn-ea430ac9df46cf01c8c4f8502097057a8da42600.zip
mud diagnostics and user info
-rw-r--r--ShiftOS_TheReturn/Scripting.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Scripting.cs b/ShiftOS_TheReturn/Scripting.cs
index b3e5208..bb65dc7 100644
--- a/ShiftOS_TheReturn/Scripting.cs
+++ b/ShiftOS_TheReturn/Scripting.cs
@@ -354,6 +354,35 @@ end");
}
}
+ [Exposed("mud")]
+ public class MUDFunctions
+ {
+ public void sendDiagnostic(string src, string cat, object val)
+ {
+ ServerManager.SendMessage("diag_log", $"[{src}] <{cat}>: {val}");
+ }
+ }
+
+ [Exposed("userinfo")]
+ public class UserInfoFunctions
+ {
+ public string getUsername()
+ {
+ return SaveSystem.CurrentSave.Username;
+ }
+
+ public string getSysname()
+ {
+ return SaveSystem.CurrentSave.SystemName;
+ }
+
+ public string getEmail()
+ {
+ return getUsername() + "@" + getSysname();
+ }
+ }
+
+
[Exposed("infobox")]
public class InfoboxFunctions
{