X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/blobdiff_plain/55fd88eb5bc3006a975800bca93c05e51a1c8e9c..bca6dbd294c4e7738924e8ccfaec68129f76b1b3:/plugins.php diff --git a/plugins.php b/plugins.php index 739c9c9..969479e 100644 --- a/plugins.php +++ b/plugins.php @@ -59,15 +59,15 @@ class Plugin public $error = NULL; function __construct($handle) { - if (!is_dir("plugins/$handle")) - $this->error = "Plugin directory \"plugins/$handle\" doesn't exist"; + if (!is_dir(UPATH."/plugins/$handle")) + $this->error = "Plugin directory \"".UPATH."/plugins/$handle\" doesn't exist"; - else if (!is_file("plugins/$handle/$handle.php")) - $this->error = "Plugin file \"plugins/$handle/$handle.php\" doesn't exist"; + else if (!is_file(UPATH."/plugins/$handle/$handle.php")) + $this->error = "Plugin file \"".UPATH."/plugins/$handle/$handle.php\" doesn't exist"; else { - require_once "plugins/$handle/$handle.php"; + require_once UPATH."/plugins/$handle/$handle.php"; if (!class_exists($handle)) $this->error = "Class \"$handle\" doesn't exist";