]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - plugins.php
Make the overview a little tidier as discussed on IRC
[irc/unrealircd/unrealircd-webpanel.git] / plugins.php
index 6d521eb87b6424c2d46778286095018c5a4d6d82..c080e1b7ab1353464677a05640304c075581f5f6 100644 (file)
@@ -1,9 +1,5 @@
 <?php
-
-require_once "config.php";
-
 require_once "common.php";
-
 require_once "Classes/class-message.php";
 
 
@@ -110,9 +106,9 @@ class Plugin
        }
 }
 
-if (defined('PLUGINS'))
+if (get_config("plugins"))
 {
-       foreach(PLUGINS as $plugin)
+       foreach(get_config("plugins") as $plugin)
                Plugins::load($plugin);
 }
 
@@ -121,4 +117,17 @@ function require_plugin($name, $version)
 {
        if (!Plugins::plugin_exists($name,$version))
                die("Missing plugin: $name v$version");
+}
+
+
+
+/* I'm not a fan of globals */
+class AuthModLoaded
+{
+       public static $status = 0;
+}
+
+function is_auth_provided()
+{
+       return AuthModLoaded::$status;
 }
\ No newline at end of file