diff --git a/include/core/PHPMC/Main.php b/include/core/PHPMC/Main.php index 7ba649d..7e7e580 100644 --- a/include/core/PHPMC/Main.php +++ b/include/core/PHPMC/Main.php @@ -1,7 +1,7 @@ Println("Error when load plugin: " . $files . ": No such plugin info file: " . $target . "
" . $data); } + if(stristr($this->plugins, $info['package'] . ";")) { + continue; + } include("{$realpath}/{$file}/{$files}"); + $this->plugin .= $info['package'] . ";"; eval('$' . $info['main'] . ' = new ' . $info['main'] . '();'); eval('$' . $info['main'] . '->onload();'); } else { @@ -36,7 +42,11 @@ class Plugin { if(!$info) { PHPMC::Error()->Println("Error when load plugin: " . $file . ": No such plugin info file: " . $target . "
" . $data); } + if(stristr($this->plugins, $info['package'] . ";")) { + continue; + } include("{$realpath}/{$file}"); + $this->plugin .= $info['package'] . ";"; eval('$' . $info['main'] . ' = new ' . $info['main'] . '();'); eval('$' . $info['main'] . '->onload();'); }