]> 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 3bf8b9a816b20e56f42e1a04f8bc4ff975f8bb9e..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);
 }
 
@@ -123,8 +119,6 @@ function require_plugin($name, $version)
                die("Missing plugin: $name v$version");
 }
 
-
-
 /* I'm not a fan of globals */
 class AuthModLoaded
 {
@@ -134,4 +128,4 @@ class AuthModLoaded
 function is_auth_provided()
 {
        return AuthModLoaded::$status;
-}
\ No newline at end of file
+}