1
0
mirror of https://github.com/Ylianst/MeshCentralRouter synced 2026-01-04 09:13:16 +00:00

Added support for clipboard removal.

This commit is contained in:
Ylian Saint-Hilaire
2021-07-15 15:05:36 -07:00
parent 7ce5def535
commit 5ed4cd2cbe
3 changed files with 24 additions and 4 deletions

View File

@@ -67,6 +67,8 @@ namespace MeshCentralRouter
public Dictionary<string, ulong> userRights = null;
public Dictionary<string, string> userGroups = null;
private JavaScriptSerializer JSON = new JavaScriptSerializer();
public int features = 0; // Bit flags of server features
public int features2 = 0; // Bit flags of server features
// Mesh Rights
/*
@@ -237,6 +239,12 @@ namespace MeshCentralRouter
}
case "serverinfo":
{
// Get the bit flags of server features
Dictionary<string, object> serverinfo = (Dictionary<string, object>)jsonAction["serverinfo"];
if (serverinfo.ContainsKey("features") && (serverinfo["features"].GetType() == typeof(int))) { features = (int)serverinfo["features"]; }
if (serverinfo.ContainsKey("features2") && (serverinfo["features2"].GetType() == typeof(int))) { features2 = (int)serverinfo["features2"]; }
// Ask for a lot of things from the server
wc.WriteStringWebSocket("{\"action\":\"usergroups\"}");
wc.WriteStringWebSocket("{\"action\":\"meshes\"}");
wc.WriteStringWebSocket("{\"action\":\"nodes\"}");