diff --git a/modSync.cs b/modSync.cs
index 8c931b2..5d14d06 100644
--- a/modSync.cs
+++ b/modSync.cs
@@ -57,7 +57,8 @@ public static void Unload()
/// (string) Intended destination of the message
/// (string) Type of message being sent
/// (string) Contents of message being sent
- public static async void SendMessage(string Destination, string MessageType, string Message)
+ /// (string) Contents of extended message data
+ public static async void SendMessage(string Destination, string MessageType, string Message, string ExtendedMessage = "")
{
// TODO Only send messages if we are online
try
@@ -70,6 +71,7 @@ public static async void SendMessage(string Destination, string MessageType, str
MessageClient.Timeout = httpTimeout;
string EncodedCreds = System.Convert.ToBase64String(System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes("sandstorm:" + Sync_SandstormToken));
MessageBuilder.Headers.Add("Authorization", "Basic " + EncodedCreds);
+ if (ExtendedMessage != "") { MessageBuilder.Content = new StringContent(ExtendedMessage); }
HttpResponseMessage MessageResponse = await MessageClient.SendAsync(MessageBuilder);
if (MessageResponse.IsSuccessStatusCode != true)
diff --git a/modSystem.cs b/modSystem.cs
index 40a33be..35e26c2 100644
--- a/modSystem.cs
+++ b/modSystem.cs
@@ -57,7 +57,7 @@ public static string GetInstalledSoftware()
NewSoftware = NewSoftware.Substring(0, NewSoftware.Length - 2);
NewSoftwareJSON = NewSoftwareJSON.Substring(0, NewSoftwareJSON.Length - 1) + "]}";
modLogging.LogEvent("Detected new software installed: " + NewSoftware, EventLogEntryType.Information, 6051);
- modLogging.LogEvent(NewSoftwareJSON, EventLogEntryType.Information, 6051);
+ modSync.SendMessage("server", "nodedata", "newsoftware", NewSoftwareJSON);
}
return "Installed Applications: " + count.ToString();
}