HI
habe irgendwie ein Problem mit $mod->getCV
(gelöst folgende Code zeilen sind jetzt richtig)
PHP
$mod->setDefaultCV("teamspeak", "ts3_ip" , "127.0.0.1");
$mod->setDefaultCV("teamspeak", "ts3_queryport" , 10011);
$mod->setDefaultCV("teamspeak", "ts3_user" , 'serveradmin');
$mod->setDefaultCV("teamspeak", "ts3_pass" , 'test');
$mod->setDefaultCV("teamspeak", "ts3_port" , 9987);
$mod->setDefaultCV("teamspeak", "ts3_inform" , 0);
$mod->setDefaultCV("teamspeak", "ts3_forbidden" , 0);
$teamspeak_objekt = new teamspeak3_class();
$mod->registerCommand("admin", '~^admin \S.*$~i' , "pokeAdmins", $teamspeak_objekt);
class teamspeak3_class {
private $mod = false;
private $players = false;
private $logging = false;
private $disabled = false;
private $teamspeak = false;
private $ts3_ip = false;
private $ts3_queryport = false;
private $ts3_user = false;
private $ts3_pass = false;
private $ts3_port = false;
private $ts3_inform = false;
private $ts3_forbidden = false;
public function __construct() {
$this->mod = & $GLOBALS['mod'];
$this->players = & $GLOBALS['players'];
$this->logging = & $GLOBALS['logging'];
$this->ts3_ip = $this->mod->getCV("teamspeak", "ts3_ip");
$this->ts3_queryport= 10011;
$this->ts3_user = "serveradmin";
$this->ts3_pass = "test";
$this->ts3_port = 9987;
$this->ts3_inform = "2";
$this->ts3_forbidden= array(39);
$this->disabled = $this->checkConnection();
}
Alles anzeigen
Die Logfile sagt