Convert Vimish to use global config
[WebThing.git] / plugins / DefaultPage.cs
index 38ed672..f7076e5 100644 (file)
@@ -2,9 +2,11 @@ using System;
 using bytex64.WebThing;
 
 public class DefaultPage : WebThingPlugin {
-    public void Init(WebThing wt) {
-        if (wt.Arguments.Length > 0) {
-            wt.OpenUri(wt.Arguments[0]);
+    public override void Init(WebThing wt) {
+        if (Config.Arguments.Length > 0) {
+            wt.OpenUri(Config.Arguments[0]);
+        } else if (Config.Options.ContainsKey("DefaultPage")) {
+            wt.OpenUri(Config.Options["DefaultPage"]);
         } else {
             wt.OpenUri("http://dominionofawesome.com/");
         }