]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - plugins.php
Add Plugins: remove author from card footer
[irc/unrealircd/unrealircd-webpanel.git] / plugins.php
index 6d521eb87b6424c2d46778286095018c5a4d6d82..225d144050226e86fc085166fa9ad10ce00bfa4f 100644 (file)
@@ -1,9 +1,5 @@
 <?php
-
-require_once "config.php";
-
-require_once "common.php";
-
+require_once "inc/common.php";
 require_once "Classes/class-message.php";
 
 
@@ -49,7 +45,7 @@ class Plugins
        static function plugin_exists($name, $version = NULL)
        {
                foreach(self::$list as $p)
-                       if (!strcasecmp($p->name,$name) && (!$version || ($version >= $p->version)))
+                       if (!strcmp($p->name,$name) && (!$version || ($version >= $p->version)))
                                return true;
 
                return false;
@@ -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,15 @@ function require_plugin($name, $version)
 {
        if (!Plugins::plugin_exists($name,$version))
                die("Missing plugin: $name v$version");
-}
\ No newline at end of file
+}
+
+/* I'm not a fan of globals */
+class AuthModLoaded
+{
+       public static $status = 0;
+}
+
+function is_auth_provided()
+{
+       return AuthModLoaded::$status;
+}