Ejemplo n.º 1
0
Archivo: Job.php Proyecto: Laxa/Nimda3
 private function loadPlugin()
 {
     require_once $this->data['plugin_path'];
     $c = libFile::parseConfigFile('nimda.conf');
     $MySQL = new MySQL($c['mysql_host'], $c['mysql_user'], $c['mysql_pass'], $c['mysql_db']);
     $this->Plugin = new $this->data['classname'](null, $MySQL);
 }
Ejemplo n.º 2
0
 private function initBot()
 {
     $this->CONFIG = libFile::parseConfigFile('nimda.conf');
     $this->MySQL = new MySQL($this->CONFIG['mysql_host'], $this->CONFIG['mysql_user'], $this->CONFIG['mysql_pass'], $this->CONFIG['mysql_db']);
     $this->autoUpdateSQL();
     $this->createTempDir();
     $this->initJobs();
     $this->initPlugins();
     $this->initServers();
     $this->timersLastTriggered = time() + 10;
     // Give him some time to do the connecting before triggering the timers
 }
Ejemplo n.º 3
0
 private function updateGames()
 {
     $files = libFilesystem::getFiles(self::FILEDIR, 'conf');
     $additions = array();
     foreach ($files as $file) {
         $config = libFile::parseConfigFile(self::FILEDIR . $file);
         if (file_exists(self::FILEDIR . 'games/' . $config['gamefile'])) {
             if (!isset($this->games[$config['id']])) {
                 $additions[] = $config['name'];
             }
             $this->games[$config['id']] = $config;
         }
     }
     return $additions;
 }