Example #1
0
 public function import()
 {
     $arr = fgHelper::loadIniFile(self::ini, false);
     $server_type_id = fgServerType::idFromKey($this->server_type);
     foreach ($arr as $location => $v) {
         $s = new fgServer(0);
         $s->nick = null;
         $s->server_type_id = $server_type_id;
         $s->host = $v['server'];
         $s->location = $location;
         $s->ip = isset($v['ip']) ? $v['ip'] : null;
         $s->save();
     }
 }
Example #2
0
 public function import()
 {
     global $Site;
     $ini = fgHelper::loadIniFile(self::ini, false);
     $server_type_id = fgServerType::idFromKey($this->server_type);
     foreach ($ini as $channel => $v) {
         $s = new fgServer(0);
         $s->nick = $v['title'];
         $s->server_type_id = $server_type_id;
         $s->host = $this->server;
         $s->location = $channel;
         $s->irc = null;
         $s->save();
     }
 }
Example #3
0
 public function import()
 {
     $arr = fgHelper::loadIniFile(self::ini, false);
     $server_type_id = fgServerType::idFromKey($this->server_type);
     foreach ($arr as $host => $v) {
         $parts = explode(".", $host);
         $s = new fgServer(0);
         $s->nick = $parts[0];
         $s->server_type_id = $server_type_id;
         $s->host = $host;
         $s->ip = isset($v['ip']) ? $v['ip'] : null;
         $s->contact = isset($v['contact']) ? $v['contact'] : null;
         $s->location = isset($v['location']) ? $v['location'] : null;
         $s->irc = isset($v['irc']) ? $v['irc'] : null;
         $s->tracked = $v['tracked'] == 1 ? true : null;
         $s->save();
     }
 }
Example #4
0
$m = new fgIrc();
$m->import();
$m = new fgMirror();
$m->import();
$m = new fgMpServer();
$m->import();
$S = new fgServer(0);
$S->server_type = $ids['mpmap'];
$S->nick = 'mpmap01';
$S->host = 'http://mpmap01.flightgear.org';
$S->save();
$S = new fgServer(0);
$S->server_type_id = $ids['mpmap'];
$S->nick = 'mpmap02';
$S->host = 'http://mpmap02.flightgear.org';
$S->irc = 'pigeon';
$S->contact = 'Pigeond';
$S->location = 'Honk Kong';
$S->save();
$S = new fgServer(0);
$S->server_type = $ids['mapserver'];
$S->nick = 'mapserver';
$S->host = 'http://mapserver.flightgear.org';
$S->save();
/*
$S = new fgServer(0);
$S->server_type = $ids['hangar'];
$S->nick = 'mapserver';
$S->host = 'http://mapserver.flightgear.org';
$S->save();
*/