Index: binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs	(revision 250)
+++ binary-improvements/MapRendering/Web/Handlers/ApiHandler.cs	(revision 251)
@@ -13,16 +13,27 @@
 		private Dictionary<String, WebAPI> apis = new Dictionary<string, WebAPI> ();
 
-		public ApiHandler (string staticPart, string moduleName = null) : base(moduleName) {
+		public ApiHandler (string staticPart, string moduleName = null) : base (moduleName) {
 			this.staticPart = staticPart;
 
 			foreach (Type t in Assembly.GetExecutingAssembly ().GetTypes ()) {
 				if (!t.IsAbstract && t.IsSubclassOf (typeof(WebAPI))) {
-					ConstructorInfo ctor = t.GetConstructor (new Type[0]);
+					ConstructorInfo ctor = t.GetConstructor (new Type [0]);
 					if (ctor != null) {
-						WebAPI apiInstance = (WebAPI)ctor.Invoke (new object[0]);
+						WebAPI apiInstance = (WebAPI)ctor.Invoke (new object [0]);
 						addApi (t.Name.ToLower (), apiInstance);
 					}
 				}
 			}
+
+            // Add dummy types
+            Type dummy_t = typeof (API.Null);
+            ConstructorInfo dummy_ctor = dummy_t.GetConstructor (new Type [0]);
+            if (dummy_ctor != null) {
+                WebAPI dummy_apiInstance = (WebAPI)dummy_ctor.Invoke (new object[0]);
+
+                // Permissions that don't map to a real API
+                addApi("viewallclaims", dummy_apiInstance);
+                addApi("viewallplayers", dummy_apiInstance);
+            }
 		}
 
Index: binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 250)
+++ binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 251)
@@ -1,5 +1,4 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Net;
 using System.Threading;
@@ -13,6 +12,6 @@
 		private string staticPart;
 		private bool logMissingFiles;
-		private Dictionary<string, byte[]> icons = new Dictionary<string, byte[]> ();
-		private bool loaded = false;
+        private Dictionary<string, byte[]> icons = new Dictionary<string, byte[]> ();
+        private bool loaded = false;
 
 		public ItemIconHandler (string staticPart, bool logMissingFiles, string moduleName = null) : base(moduleName) {
@@ -30,11 +29,68 @@
 			}
 
-			string fn = req.Url.AbsolutePath.Remove (0, staticPart.Length);
-			fn = fn.Remove (fn.LastIndexOf ('.'));
+            // BEGIN CHANGED BY PSOUZA4
+			string requestFileName = req.Url.AbsolutePath.Remove (0, staticPart.Length);
+			requestFileName = requestFileName.Remove (requestFileName.LastIndexOf ('.'));
 
-			if (icons.ContainsKey (fn)) {
+            string requestColorTintHex = string.Empty;
+            
+            // Chose a split instead of using a querystring variable in the URI, but that may arguably be cleaner
+            if (requestFileName.Contains("@@")) {
+                try {
+                    string[] tempTintingOptions = requestFileName.Split (new string[] { "@@" }, StringSplitOptions.RemoveEmptyEntries);
+                    requestFileName = tempTintingOptions [0];
+                    requestColorTintHex = tempTintingOptions [1].Trim ().ToUpper ();
+                }
+                catch { }
+            }
+
+            if (icons.ContainsKey (requestFileName) && req.Url.AbsolutePath.ToLower ().EndsWith(".png")) {
 				resp.ContentType = MimeType.GetMimeType (".png");
-				resp.ContentLength64 = icons [fn].Length;
-				resp.OutputStream.Write (icons [fn], 0, icons [fn].Length);
+
+                byte[] itemIconData = icons [requestFileName];
+
+                // Note: optionally split this code into a ImageMultiplyBlend method
+                if (!string.IsNullOrEmpty (requestColorTintHex) && (requestColorTintHex != "FFFFFF")) {
+                    try {
+                        System.Drawing.Color colorTint = System.Drawing.ColorTranslator.FromHtml ("#" + requestColorTintHex);
+                        System.Drawing.Bitmap image = (System.Drawing.Bitmap)PetesUtils.GetImageFromBytes (itemIconData);
+
+                        for (var x = 0; x < image.Width; x++) {
+                            for (int y = 0; y < image.Height; y++) {
+                                System.Drawing.Color originalColor = image.GetPixel (x, y);
+                                System.Drawing.Color changedColor = originalColor;
+
+                                // Only change the icon tinting if the alpha channel is fully opaque
+                                if (originalColor.A == 255) {
+                                    // based on http://stackoverflow.com/questions/3837757/multiply-two-images-in-c-sharp-as-multiply-two-layers-in-photoshop
+
+                                    double component_R = (((double)originalColor.R) * ((double)colorTint.R)) / 255.0;
+                                    double component_G = (((double)originalColor.G) * ((double)colorTint.G)) / 255.0;
+                                    double component_B = (((double)originalColor.B) * ((double)colorTint.B)) / 255.0;
+
+                                    if (component_R > 255.0) component_R = 255.0;
+                                    if (component_G > 255.0) component_G = 255.0;
+                                    if (component_B > 255.0) component_B = 255.0;
+
+                                    // multiply blend shouldn't ever calculate below 0, but for completeness let's leave in this logic
+                                    if (component_R < 0.0) component_R = 0.0;
+                                    if (component_G < 0.0) component_G = 0.0;
+                                    if (component_B < 0.0) component_B = 0.0;
+
+                                    changedColor = System.Drawing.Color.FromArgb (originalColor.A, (int)component_R, (int)component_G, (int)component_B);
+                                }                                
+
+                                image.SetPixel (x, y, changedColor);
+                            }
+                        }
+
+                        itemIconData = PetesUtils.SaveImage_ToBytes (image, true);
+                    }
+                    catch { }
+                }
+
+				resp.ContentLength64 = itemIconData.Length;
+				resp.OutputStream.Write (itemIconData, 0, itemIconData.Length);
+                // END CHANGED BY PSOUZA4
 			} else {
 				resp.StatusCode = (int)HttpStatusCode.NotFound;
Index: binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs	(revision 250)
+++ binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs	(revision 251)
@@ -27,4 +27,5 @@
 
 			byte[] content = cache.GetFileContent (datapath + "/" + fn);
+
 			if (content != null) {
 				resp.ContentType = MimeType.GetMimeType (Path.GetExtension (fn));
