Added session management plugin
[WebThing.git] / Config.cs
index ac70dc8..3ffd66d 100644 (file)
--- a/Config.cs
+++ b/Config.cs
@@ -226,5 +226,18 @@ namespace bytex64.WebThing {
 
             f.Close();
         }
+
+        // Data parsers
+        public static bool ParseBool(string v) {
+            switch(v.ToLower()) {
+            case "true":
+            case "t":
+            case "1":
+            case "on":
+            case "yes":
+                return true;
+            }
+            return false;
+        }
     }
 }