release 1.2.10
This commit is contained in:
41
install.php
41
install.php
@@ -111,8 +111,7 @@ $db[\'pass\']=\''.$pass.'\';
|
||||
$db[\'dbname\']=\''.$dbname.'\';
|
||||
?>';
|
||||
|
||||
$handle=fopen('./other/dbconfig.php','w');
|
||||
if(!fwrite($handle,$newconfig)) {
|
||||
if(!is_writable('./other/dbconfig.php')) {
|
||||
$err_msg = $lang['isntwicfg'];
|
||||
$err_lvl = 2;
|
||||
} else {
|
||||
@@ -147,7 +146,7 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
$count++;
|
||||
}
|
||||
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`config` (`webuser` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`webpass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tshost` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tsquery` smallint(5) UNSIGNED NOT NULL default '0',`tsvoice` smallint(5) UNSIGNED NOT NULL default '0',`tsuser` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tspass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`language` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`queryname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`queryname2` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`grouptime` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`resetbydbchange` tinyint(1) NOT NULL default '0',`msgtouser` tinyint(1) NOT NULL default '0',`currvers` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`substridle` tinyint(1) NOT NULL default '0',`exceptuuid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`exceptgroup` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`dateformat` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showexcld` tinyint(1) NOT NULL default '0',`showcolcld` tinyint(1) NOT NULL default '0',`showcoluuid` tinyint(1) NOT NULL default '0',`showcoldbid` tinyint(1) NOT NULL default '0',`showcolot` tinyint(1) NOT NULL default '0',`showcolit` tinyint(1) NOT NULL default '0',`showcolat` tinyint(1) NOT NULL default '0',`showcolnx` tinyint(1) NOT NULL default '0',`showcolsg` tinyint(1) NOT NULL default '0',`showcolrg` tinyint(1) NOT NULL default '0',`showcolls` tinyint(1) NOT NULL default '0',`slowmode` mediumint(9) NOT NULL default '0',`cleanclients` tinyint(1) NOT NULL default '0',`cleanperiod` mediumint(9) NOT NULL default '0',`showhighest` tinyint(1) NOT NULL default '0',`boost` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showcolas` tinyint(1) NOT NULL default '0',`defchid` int(10) NOT NULL default '0',`timezone` varchar(35) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`logpath` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`advancemode` tinyint(1) NOT NULL default '0',`count_access` tinyint(2) NOT NULL default '0',`last_access` bigint(11) NOT NULL default '0',`ignoreidle` smallint(5) NOT NULL default '0',`exceptcid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`rankupmsg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`boost_mode` tinyint(1) NOT NULL default '0',`newversion` varchar(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`servernews` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`adminuuid` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`nextupinfo` tinyint(1) NOT NULL default '0',`nextupinfomsg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg3` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`shownav` tinyint(1) NOT NULL default '0',`showgrpsince` tinyint(1) NOT NULL default '0',`resetexcept` tinyint(1) NOT NULL default '0',`upchannel` varchar(20) NOT NULL default '0',`avatar_delay` smallint(5) UNSIGNED NOT NULL default '0',`registercid` mediumint(8) UNSIGNED NOT NULL default '0',`iphash` tinyint(1) NOT NULL default '0')") === false) {
|
||||
if($mysqlcon->exec("CREATE TABLE `$dbname`.`config` (`webuser` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`webpass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tshost` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tsquery` smallint(5) UNSIGNED NOT NULL default '0',`tsvoice` smallint(5) UNSIGNED NOT NULL default '0',`tsuser` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`tspass` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`language` char(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`queryname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`queryname2` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`grouptime` varchar(5000) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`resetbydbchange` tinyint(1) NOT NULL default '0',`msgtouser` tinyint(1) NOT NULL default '0',`currvers` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`substridle` tinyint(1) NOT NULL default '0',`exceptuuid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`exceptgroup` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`dateformat` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showexcld` tinyint(1) NOT NULL default '0',`showcolcld` tinyint(1) NOT NULL default '0',`showcoluuid` tinyint(1) NOT NULL default '0',`showcoldbid` tinyint(1) NOT NULL default '0',`showcolot` tinyint(1) NOT NULL default '0',`showcolit` tinyint(1) NOT NULL default '0',`showcolat` tinyint(1) NOT NULL default '0',`showcolnx` tinyint(1) NOT NULL default '0',`showcolsg` tinyint(1) NOT NULL default '0',`showcolrg` tinyint(1) NOT NULL default '0',`showcolls` tinyint(1) NOT NULL default '0',`slowmode` mediumint(9) NOT NULL default '0',`cleanclients` tinyint(1) NOT NULL default '0',`cleanperiod` mediumint(9) NOT NULL default '0',`showhighest` tinyint(1) NOT NULL default '0',`boost` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`showcolas` tinyint(1) NOT NULL default '0',`defchid` int(10) NOT NULL default '0',`timezone` varchar(35) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`logpath` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`advancemode` tinyint(1) NOT NULL default '0',`count_access` tinyint(2) NOT NULL default '0',`last_access` bigint(11) NOT NULL default '0',`ignoreidle` smallint(5) NOT NULL default '0',`exceptcid` varchar(999) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`rankupmsg` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`boost_mode` tinyint(1) NOT NULL default '0',`newversion` varchar(25) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`servernews` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`adminuuid` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci,`nextupinfo` tinyint(1) NOT NULL default '0',`nextupinfomsg1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`nextupinfomsg3` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,`shownav` tinyint(1) NOT NULL default '0',`showgrpsince` tinyint(1) NOT NULL default '0',`resetexcept` tinyint(1) NOT NULL default '0',`upchannel` varchar(20) NOT NULL default '0',`avatar_delay` smallint(5) UNSIGNED NOT NULL default '0',`registercid` mediumint(8) UNSIGNED NOT NULL default '0',`iphash` tinyint(1) NOT NULL default '0',`tsencrypt` tinyint(1) NOT NULL default '0')") === false) {
|
||||
$err_msg .= $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true).'<br>'; $err_lvl = 2;
|
||||
$count++;
|
||||
}
|
||||
@@ -240,9 +239,15 @@ $db[\'dbname\']=\''.$dbname.'\';
|
||||
if($count == 1) {
|
||||
$err_msg = sprintf($lang['instdbsuc'], $dbname); $err_lvl = NULL;
|
||||
$install_webuser = 1;
|
||||
|
||||
$dbconfig = fopen('./other/dbconfig.php','w');
|
||||
if(!fwrite($dbconfig, $newconfig)) {
|
||||
$err_msg = $lang['isntwicfg'];
|
||||
$err_lvl = 2;
|
||||
}
|
||||
fclose($dbconfig);
|
||||
}
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
if (isset($_POST['install'])) {
|
||||
@@ -297,7 +302,7 @@ if(isset($_POST['confweb'])) {
|
||||
$pass=password_hash($_POST['pass'], PASSWORD_DEFAULT);
|
||||
$logpath = addslashes(__DIR__."/logs/");
|
||||
$dbname = $db['dbname'];
|
||||
$dbserver = $db['dbtype'].':host='.$db['dbhost'].'; dbname=`'.$db['dbname'].'`;charset=utf8mb4';
|
||||
$dbserver = $db['type'].':host='.$db['host'].'; dbname=`'.$db['dbname'].'`;charset=utf8mb4';
|
||||
$dbserver2 = $db['type'].':host='.$db['host'];
|
||||
try {
|
||||
$mysqlcon = new PDO($dbserver, $db['user'], $db['pass']);
|
||||
@@ -314,7 +319,7 @@ if(isset($_POST['confweb'])) {
|
||||
$nextupinfomsg3 = $mysqlcon->quote("You are excepted from the Ranksystem. If you wish to rank contact an admin on the TS3 server.");
|
||||
$servernews = $mysqlcon->quote("<strong>Message</strong><br>This is an example Message.<br>Change this Message inside the webinterface.");
|
||||
$rankupmsg = $mysqlcon->quote('Hey, you reached a higher rank, since you already connected for %1$s days, %2$s hours and %3$s minutes to our TS3 server.[B]Keep it up![/B] ;-) ');
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`config` (`webuser`,`webpass`,`tshost`,`tsquery`,`tsvoice`,`tsuser`,`language`,`queryname`,`queryname2`,`grouptime`,`resetbydbchange`,`msgtouser`,`currvers`,`exceptuuid`,`exceptgroup`,`dateformat`,`showexcld`,`showcolcld`,`showcoluuid`,`showcoldbid`,`showcolot`,`showcolit`,`showcolat`,`showcolnx`,`showcolsg`,`showcolrg`,`showcolls`,`slowmode`,`cleanclients`,`cleanperiod`,`showhighest`,`showcolas`,`defchid`,`timezone`,`logpath`,`ignoreidle`,`rankupmsg`,`newversion`,`servernews`,`nextupinfo`,`nextupinfomsg1`,`nextupinfomsg2`,`nextupinfomsg3`,`shownav`,`showgrpsince`,`resetexcept`,`upchannel`,`avatar_delay`,`iphash`) VALUES ('$user','$pass','localhost','10011','9987','serveradmin','en','Ranksystem','RankSystem','31536000=>47,31536060=>50','1','1','1.2.9','xrTKhT/HDl4ea0WoFDQH2zOpmKg=','2,6','%a days, %h hours, %i mins, %s secs','1','1','1','1','1','1','1','1','1','1','1','0','1','86400','1','1','0','Europe/Berlin','$logpath','600',$rankupmsg,'1.2.9',$servernews,'1',$nextupinfomsg1,$nextupinfomsg2,$nextupinfomsg3,'1','1','0','version','0','0')") === false) {
|
||||
if($mysqlcon->exec("INSERT INTO `$dbname`.`config` (`webuser`,`webpass`,`tshost`,`tsquery`,`tsvoice`,`tsuser`,`language`,`queryname`,`queryname2`,`grouptime`,`resetbydbchange`,`msgtouser`,`currvers`,`exceptuuid`,`exceptgroup`,`dateformat`,`showexcld`,`showcolcld`,`showcoluuid`,`showcoldbid`,`showcolot`,`showcolit`,`showcolat`,`showcolnx`,`showcolsg`,`showcolrg`,`showcolls`,`slowmode`,`cleanclients`,`cleanperiod`,`showhighest`,`showcolas`,`defchid`,`timezone`,`logpath`,`ignoreidle`,`rankupmsg`,`newversion`,`servernews`,`nextupinfo`,`nextupinfomsg1`,`nextupinfomsg2`,`nextupinfomsg3`,`shownav`,`showgrpsince`,`resetexcept`,`upchannel`,`avatar_delay`,`iphash`) VALUES ('$user','$pass','localhost','10011','9987','serveradmin','en','Ranksystem','RankSystem','31536000=>47,31536060=>50','1','1','1.2.10','xrTKhT/HDl4ea0WoFDQH2zOpmKg=','2,6','%a days, %h hours, %i mins, %s secs','1','1','1','1','1','1','1','1','1','1','1','0','1','86400','1','1','0','Europe/Berlin','$logpath','600',$rankupmsg,'1.2.10',$servernews,'1',$nextupinfomsg1,$nextupinfomsg2,$nextupinfomsg3,'1','1','0','version','0','0','0')") === false) {
|
||||
$err_msg = $lang['isntwidbmsg'].$mysqlcon->errorCode()." ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 2;
|
||||
} else {
|
||||
$err_msg = $lang['isntwiusr'].'<br><br>';
|
||||
@@ -336,41 +341,41 @@ if (!isset($_POST['install']) && !isset($_POST['confweb'])) {
|
||||
$err_msg = sprintf($lang['winav10'], $host,'</a>!<br>', '<br>'); $err_lvl = 2;
|
||||
}
|
||||
if(!is_writeable('./other/dbconfig.php')) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['isntwicfg']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['isntwicfg']; $err_lvl = 3;
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms('./avatars/')), -4)!='0777') {
|
||||
unset($err_msg); $err_msg .= "<br>".sprintf($lang['isntwichm'],"avatars"); $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = sprintf($lang['isntwichm'],"avatars"); $err_lvl = 3;
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms('./tsicons/')), -4)!='0777') {
|
||||
unset($err_msg); $err_msg .= "<br>".sprintf($lang['isntwichm'],"tsicons"); $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = sprintf($lang['isntwichm'],"tsicons"); $err_lvl = 3;
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms('./logs/')), -4)!='0777') {
|
||||
unset($err_msg); $err_msg .= "<br>".sprintf($lang['isntwichm'],"logs"); $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = sprintf($lang['isntwichm'],"logs"); $err_lvl = 3;
|
||||
}
|
||||
if(substr(sprintf('%o', fileperms('./update/')), -4)!='0777') {
|
||||
unset($err_msg); $err_msg .= "<br>".sprintf($lang['isntwichm'],"update"); $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = sprintf($lang['isntwichm'],"update"); $err_lvl = 3;
|
||||
}
|
||||
if(!class_exists('PDO')) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr2']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr2']; $err_lvl = 3;
|
||||
}
|
||||
if(!function_exists('exec')) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr3']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr3']; $err_lvl = 3;
|
||||
}
|
||||
if(version_compare(phpversion(), '5.5.0', '<')) {
|
||||
unset($err_msg); $err_msg .= "<br>".sprintf($lang['insterr4'],phpversion()); $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = sprintf($lang['insterr4'],phpversion()); $err_lvl = 3;
|
||||
}
|
||||
if(!function_exists('simplexml_load_file')) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr5']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr5']; $err_lvl = 3;
|
||||
}
|
||||
if(!in_array('curl', get_loaded_extensions())) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr6']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr6']; $err_lvl = 3;
|
||||
}
|
||||
if(!in_array('zip', get_loaded_extensions())) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr7']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr7']; $err_lvl = 3;
|
||||
}
|
||||
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
if(!in_array('com_dotnet', get_loaded_extensions())) {
|
||||
unset($err_msg); $err_msg .= "<br>".$lang['insterr8']; $err_lvl = 3;
|
||||
unset($err_msg); $err_msg = $lang['insterr8']; $err_lvl = 3;
|
||||
}
|
||||
}
|
||||
if(!isset($err_lvl)) {
|
||||
|
||||
48
jobs/bot.php
48
jobs/bot.php
@@ -5,12 +5,10 @@ ini_set('default_charset', 'UTF-8');
|
||||
setlocale(LC_ALL, 'UTF-8');
|
||||
error_reporting(0);
|
||||
|
||||
function shutdown($mysqlcon = NULL, $logpath, $timezone, $loglevel, $reason, $nodestroypid = NULL) {
|
||||
if($nodestroypid == NULL) {
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("del /F ".substr(__DIR__,0,-4).'logs/pid');
|
||||
} else {
|
||||
exec("rm -f ".substr(__DIR__,0,-4).'logs/pid');
|
||||
function shutdown($mysqlcon = NULL, $logpath, $timezone, $loglevel, $reason, $nodestroypid = TRUE) {
|
||||
if($nodestroypid === TRUE) {
|
||||
if (file_exists(substr(__DIR__,0,-4).'logs/pid')) {
|
||||
unlink(substr(__DIR__,0,-4).'logs/pid');
|
||||
}
|
||||
}
|
||||
enter_logfile($logpath,$timezone,$loglevel,$reason." Shutting down!");
|
||||
@@ -44,7 +42,9 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false)
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) unlink($file2);
|
||||
if (file_exists($file2)) {
|
||||
unlink($file2);
|
||||
}
|
||||
rename($file, $file2);
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
@@ -56,7 +56,7 @@ require_once(substr(__DIR__,0,-4).'other/config.php');
|
||||
require_once(substr(__DIR__,0,-4).'other/phpcommand.php');
|
||||
|
||||
if(isset($_SERVER['HTTP_HOST']) || isset($_SERVER['REMOTE_ADDR'])) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!", 1);
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Request to start the Ranksystem from ".$_SERVER['REMOTE_ADDR'].". It seems the request came not from the command line!");
|
||||
}
|
||||
if(version_compare(phpversion(), '5.5.0', '<')) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Your PHP version (".phpversion().") is below 5.5.0. Update of PHP is required!");
|
||||
@@ -70,6 +70,9 @@ if(!in_array('curl', get_loaded_extensions())) {
|
||||
if(!in_array('zip', get_loaded_extensions())) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "PHP Zip is missed. Installation of PHP Zip is required!");
|
||||
}
|
||||
if(!in_array('ssh2', get_loaded_extensions()) && $ts['tsencrypt'] == 1) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "PHP SSH2 is missed. Installation of PHP SSH2 is required, when using secured (SSH) connection to TeamSpeak! If you are not able to install PHP SSH2 (i.e. hosted webspace), you need to deactivate the TS3 Query encryption inside the Webinterface.");
|
||||
}
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"###################################################################");
|
||||
enter_logfile($logpath,$timezone,5,"");
|
||||
@@ -100,7 +103,7 @@ enter_logfile($logpath,$timezone,5,"Check Ranksystem files for updates [done]");
|
||||
|
||||
function check_shutdown($timezone,$logpath) {
|
||||
if(!is_file(substr(__DIR__,0,-4).'logs/pid')) {
|
||||
shutdown($mysqlcon, $logpath, $timezone, 5, "Received signal to stop!");
|
||||
shutdown(NULL, $logpath, $timezone, 5, "Received signal to stop!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,10 +120,21 @@ if($addons_config['assign_groups_active']['value'] == '1') {
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5,"Loading addons [done]");
|
||||
|
||||
enter_logfile($logpath,$timezone,5,"Connect to TS3 Server (Address: \"".$ts['host']."\" Voice-Port: \"".$ts['voice']."\" Query-Port: \"".$ts['query']."\").");
|
||||
enter_logfile($logpath,$timezone,5,"Connect to TS3 Server (Address: \"".$ts['host']."\" Voice-Port: \"".$ts['voice']."\" Query-Port: \"".$ts['query']."\" SSH: \"".$ts['tsencrypt']."\").");
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&ssh=1");
|
||||
} else {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
}
|
||||
enter_logfile($logpath,$timezone,5,"Connection to TS3 Server established.");
|
||||
try{
|
||||
$ts3version = $ts3->version();
|
||||
enter_logfile($logpath,$timezone,5," TS3 Server version: ".$ts3version['version']." on ".$ts3version['platform']." [Build: ".$ts3version['build']." from ".date("Y-m-d H:i:s",$ts3version['build'])."]");
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2," Error due getting TS3 server version - ".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
$ts3->notifyRegister("server");
|
||||
@@ -130,7 +144,7 @@ try {
|
||||
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyTextmessage", "handle_messages");
|
||||
TeamSpeak3_Helper_Signal::getInstance()->subscribe("notifyCliententerview", "event_userenter");
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2," Error due register notifyTextmessage ".$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($logpath,$timezone,2," Error due notifyRegister on TS3 server - ".$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -143,7 +157,7 @@ try {
|
||||
$ts3->selfUpdate(array('client_nickname' => $queryname2));
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['error'].$e->getCode().': '.$e->getMessage());
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,9 +170,9 @@ try {
|
||||
enter_logfile($logpath,$timezone,5," Joined to specified Channel.");
|
||||
} catch (Exception $e) {
|
||||
if($e->getCode() != 770) {
|
||||
enter_logfile($logpath,$timezone,5," Could not join specified channel.");
|
||||
enter_logfile($logpath,$timezone,2," Could not join specified channel (Channel ID: ".$defchid.") - ".$e->getCode().': '.$e->getMessage());
|
||||
} else {
|
||||
enter_logfile($logpath,$timezone,5," Joined to specified channel.");
|
||||
enter_logfile($logpath,$timezone,5," Joined to specified channel (already member of it).");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -390,14 +404,14 @@ try {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['error'].$e->getCode().': '.$e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['errorts3'].$e->getCode().': '.$e->getMessage());
|
||||
$offline_status = array(110,257,258,1024,1026,1031,1032,1033,1034,1280,1793);
|
||||
if(in_array($e->getCode(), $offline_status)) {
|
||||
if($mysqlcon->exec("UPDATE $dbname.stats_server SET server_status='0'") === false) {
|
||||
enter_logfile($logpath,$timezone,2,$lang['error'].print_r($mysqlcon->errorInfo(), true));
|
||||
}
|
||||
}
|
||||
shutdown($mysqlcon, $logpath, $timezone, 1, "Critical TS3 error on core function!");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
$newversion = '1.2.9';
|
||||
$newversion = '1.2.10';
|
||||
enter_logfile($logpath,$timezone,5,"Check Ranksystem database for updates...");
|
||||
|
||||
function set_new_version($mysqlcon,$dbname,$timezone,$newversion,$logpath) {
|
||||
@@ -64,6 +64,51 @@ function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: webinterface/admin.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/Exception.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/Exception.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update/Exception.php");
|
||||
}
|
||||
}
|
||||
if(is_dir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/')) {
|
||||
if(!rmdir(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update/')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary folder, please delete it from your webserver: libs/ts3_lib/Adapter/Update/");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Blacklist.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Blacklist.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/TSDNS.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/TSDNS.php");
|
||||
}
|
||||
}
|
||||
if(is_file(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update.php')) {
|
||||
if(!unlink(substr(__DIR__,0,-4).'libs/ts3_lib/Adapter/Update.php')) {
|
||||
enter_logfile($logpath,$timezone,4,"Unnecessary file, please delete it from your webserver: libs/ts3_lib/Adapter/Update.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function check_writable($timezone,$logpath) {
|
||||
@@ -76,7 +121,6 @@ function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
if (!$object->isDir()) {
|
||||
if(!is_writable($object->getPathname())) {
|
||||
enter_logfile($logpath,$timezone,3," File is not writeable ".$object);
|
||||
echo "\nhier: ".$object."\n";
|
||||
$counterr++;
|
||||
}
|
||||
} else {
|
||||
@@ -253,9 +297,12 @@ function check_db($mysqlcon,$lang,$dbname,$timezone,$currvers,$logpath) {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.7] Created table user_iphash successfully.");
|
||||
}
|
||||
}
|
||||
if(version_compare($currvers, '1.2.8', '<=')) {
|
||||
if(version_compare($currvers, '1.2.9', '<=')) {
|
||||
if($mysqlcon->exec("ALTER TABLE `$dbname`.`config` ADD (`tsencrypt` tinyint(1) NOT NULL default '0')") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.10] Adjusted table config successfully.");
|
||||
}
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`job_check` SET `timestamp`='".time()."' WHERE `job_name`='last_update'") === false) { } else {
|
||||
enter_logfile($logpath,$timezone,4," [1.2.9] Stored timestamp of last update successfully.");
|
||||
enter_logfile($logpath,$timezone,4," [1.2.10] Stored timestamp of last update successfully.");
|
||||
}
|
||||
}
|
||||
$currvers = set_new_version($mysqlcon,$dbname,$timezone,$newversion,$logpath);
|
||||
|
||||
@@ -11,19 +11,20 @@ function clean($ts3,$mysqlcon,$lang,$dbname,$slowmode,$timezone,$cleanclients,$c
|
||||
$break=200;
|
||||
$count_tsuser['count'] = 0;
|
||||
$clientdblist=array();
|
||||
enter_logfile($logpath,$timezone,6,"Get TS3 Clientlist...".$start);
|
||||
enter_logfile($logpath,$timezone,5," Get TS3 Clientlist...");
|
||||
while($getclientdblist=$ts3->clientListDb($start, $break)) {
|
||||
$ts3->serverInfoReset(); //TeamSpeak gets very slow on sending dblist.. needs to hold the connection
|
||||
#enter_logfile($logpath,$timezone,6,"Round TS3 Clientlist ".$start);
|
||||
check_shutdown($timezone,$logpath);
|
||||
$dummy = $mysqlcon->query("SELECT * FROM `$dbname`.`job_check`"); //TeamSpeak became very slow on sending dblist with 3.3.0.. needs to hold the connection
|
||||
$clientdblist=array_merge($clientdblist, $getclientdblist);
|
||||
$start=$start+$break;
|
||||
$count_tsuser=array_shift($getclientdblist);
|
||||
enter_logfile($logpath,$timezone,6," Got TS3 Clientlist ".count($clientdblist)." of ".$count_tsuser['count']." Clients.");
|
||||
if($count_tsuser['count'] <= $start) {
|
||||
break;
|
||||
}
|
||||
usleep($slowmode);
|
||||
}
|
||||
enter_logfile($logpath,$timezone,6,"Get TS3 Clientlist [DONE]");
|
||||
enter_logfile($logpath,$timezone,5," Get TS3 Clientlist [DONE]");
|
||||
foreach($clientdblist as $uuidts) {
|
||||
$single_uuid = $uuidts['client_unique_identifier']->toString();
|
||||
$uidarrts[$single_uuid]= 1;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang= array();
|
||||
$lang['adduser'] = "User %s (unique Client-ID: %s; Client-database-ID %s) is unknown -> added to the Ranksystem now.";
|
||||
$lang['brute'] = "Much incorrect logins detected on the webinterface. Blocked login for 300 seconds! Last access from IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "User %s (unique Client-ID: %s) got a new TeamSpeak Client-database-ID (%s). Update the old Client-database-ID (%s) and reset collected times!";
|
||||
$lang['crawl'] = "البحث عن المستخدمين المتواجدين وحساب التفاعل";
|
||||
$lang['clean'] = "البحث عن المستخدمين الذين من المفروض حذفهم";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "وقت عدم النشاط الكلي";
|
||||
$lang['listsumo'] = "وقت التواجد الكلي";
|
||||
$lang['listuid'] = "unique Client-ID";
|
||||
$lang['login'] = "Login";
|
||||
$lang['msg0001'] = "running version: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Valid commands are:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t get a command list\n[B]!version[/B]\t\t\t\t\t\t\t\t get the Ranksystem version\n[B]!update[/B], [B]!checkupdate[/B]\t\t check for new version and run update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\tget the time to the next rank up\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\trestart the Ranksystem bot\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t stop the Ranksystem bot";
|
||||
$lang['msg0003'] = "You are not eligible for this command!";
|
||||
$lang['msg0004'] = "Client %s (%s) requests shutdown.";
|
||||
@@ -532,7 +534,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 query password<br>Password for the query
|
||||
$lang['wits3querusr'] = "TS3 Query-User";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 query username<br>Default is serveradmin<br>Of course, you can also create an additional serverquery account only for the Ranksystem.<br>The needed permissions you find on:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default is 10011 (TCP)<br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 voice port<br>Default is 9987 (UDP)<br>This is the port, you uses also to connect with the TS3 Client.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "Uživatel %s (unique Client-ID: %s; Client-database-ID %s) ještě není v databázi -> přidán do Ranksystem.";
|
||||
$lang['brute'] = "Much incorrect logins detected on the webinterface. Blocked login for 300 seconds! Last access from IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "Uživatel %s (unique Client-ID: %s) má novou TeamSpeak Client-database-ID (%s). aktulizujte starou Client-database-ID (%s) a resetujte všechny časy!";
|
||||
$lang['crawl'] = "Skenuji nové i stávající uživatele.";
|
||||
$lang['clean'] = "Skunuji uživatele ke smazání";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "Dohromady online (neaktivně)";
|
||||
$lang['listsumo'] = "Dohromady online";
|
||||
$lang['listuid'] = "unique Client-ID";
|
||||
$lang['login'] = "Přihlášení";
|
||||
$lang['msg0001'] = "Aktuální verze: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Příkazy pro ovládání bota:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t vypíše seznam příkazů\n[B]!version[/B]\t\t\t\t\t\t\t\t vypíše verzi Ranksystemu\n[B]!update[/B], [B]!checkupdate[/B]\t\t Zkontroje dostupné aktualizace, popř. aktulizuje Ranksystem\n[B]!nextup[/B]\t\t\t\t\t\t\tčas do dalšího ranku (úrovně)\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\trestartuje Ranksystem bota\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t vypne Ranksystem bota";
|
||||
$lang['msg0003'] = "Nemáto dostatečné oprávnění pro tento příkaz!";
|
||||
$lang['msg0004'] = "Uživatel %s (%s) požádal o vypnutí Ranksystemu!";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 query password<br>Heslo pro uživatele q
|
||||
$lang['wits3querusr'] = "TS3 Query-uživatel";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 query (přihlašovací jméno)<br>Ve výchozím nastavení nastaveno-> serveradmin<br>Samozřejmě můžete vytvořit nový query účet přímo pro Ranksystem.<br>Potřebné oprávnění najdete zde:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Ve výchozím nastavení > 10011 (TCP)<br>Pokud nepoužíváte výchozí port (10011) koukněte do configu--> 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Pokud nepoužíváte výchozí port (10011) koukněte do configu--> 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 voice port<br>Default is 9987 (UDP)<br>Toto je port, který používáš při připojení na TS3 server v TS3 Clientu.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang= array();
|
||||
$lang['adduser'] = "User %s (eindeutige Client-ID: %s; Client-Datenbank-ID: %s) ist bisher unbekannt -> wurde nun zum Ranksystem hinzugefügt.";
|
||||
$lang['brute'] = "Es wurden einige fehlgeschlagene Login-Versuche festgestellt. Blocke login für 300 Sekunden! Letzter Versuch von IP %s.";
|
||||
$lang['brute1'] = "Fehlgeschlagener Login-Versuch zum Webinterface festgestellt. Login Anfrage kam von IP %s mit dem Usernamen %s.";
|
||||
$lang['brute2'] = "Erfolgreicher Login zum Webinterface von IP %s festgestellt.";
|
||||
$lang['changedbid'] = "User %s (eindeutige Client-ID: %s) hat eine neue TeamSpeak Client-Datenbank-ID (%s). Ersetze die alte Client-Datenbank-ID (%s) und setze die gesammelte Zeiten zurück";
|
||||
$lang['crawl'] = "Scanne nach verbundenen Usern und sammle die online Zeit...";
|
||||
$lang['clean'] = "Scanne nach Usern, welche zu löschen sind...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "ges. idle Zeit";
|
||||
$lang['listsumo'] = "ges. online Zeit";
|
||||
$lang['listuid'] = "eindeutige Client-ID";
|
||||
$lang['login'] = "Login";
|
||||
$lang['msg0001'] = "eingesetzte Version: %s";
|
||||
$lang['msg0001'] = "Das Ranksystem läuft auf Version: %s";
|
||||
$lang['msg0002'] = "Verfügbare Befehle sind:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t erhalte Liste der Befehle\n[B]!version[/B]\t\t\t\t\t\t\t\t erhalte die aktuelle Version\n[B]!update[/B], [B]!checkupdate[/B]\t\t\tprüfe auf neue Version und update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t bereinge User-Datenbank\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t erhalte die Zeit zur nächsten Rangsteigerung\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\tden Ranksystem bot neu starten\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t den Ranksystem Bot stoppen";
|
||||
$lang['msg0003'] = "Du bist nicht berechtigt diesen Befehl abzusetzen!";
|
||||
$lang['msg0004'] = "Client %s (%s) fordert Abschaltung.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 Query Passwort<br>Passwort des Query Ben
|
||||
$lang['wits3querusr'] = "TS3 Query-Benutzer";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 Query Benutzername<br>Standard ist serveradmin<br>Natürlich kann auch ein gesonderter Query-Benutzer erstellt und genutzt werden.<br>Die benötigten Rechte sind hier aufgelistet:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 Query Port<br>Standard ist 10011 (TCP)<br>andere Werte sollten in der 'ts3server.ini' zu finden sein.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 Query Port<br>Standard RAW (Klartext) ist 10011 (TCP)<br>Standard SSH (verschlüsselt) ist 10022 (TCP)<br><br>Abweichende Werte sollten sich aus der 'ts3server.ini' entnehmen lassen.";
|
||||
$lang['wits3encrypt'] = "TS3 Query Verschlüsselung";
|
||||
$lang['wits3encryptdesc'] = "Aktiviere diese Option, um die Kommunikation zwischen dem Ranksystem und dem TeamSpeak 3 Server zu verschlüsseln (SSH).<br>Ist diese Funktion deaktiviert, so erfolgt die Kommunikation unverschlüsselt (RAW). Das könnte ein Sicherheitsrisiko darstellen, insbesondere, wenn der TS3 Server und das Ranksystem auf unterschiedlichen Machinen betrieben wird.<br><br>Es ist auch sicherzustellen, dass der richtige TS3 Query Port passend zu dieser Funktion hinterlegt wird!<br><br><b>Achtung:</b> Die SSH Verschlüsselung benötigt mehr CPU und damit mehr System Ressourcen. Das ist der Grund, warum wir empfehlen die RAW Verbindung zu verwenden, wenn der TS3 Server und das Ranksystem auf der gleichen Machine laufen (localhost / 127.0.0.1). Laufen sie jedoch auf getrennten Machinen, sollte die SSH Verschlüsselung für die Verbindung aktiviert werden<br><br><b>Voraussetzungen:</b><br><br>1) TS3 Server Version 3.3.0 oder höher.<br><br>2) Die PHP Erweiterung (Extension) PHP-SSH2 wird benötigt.<br>Unter Linux kann sie wie folgt installiert werden:<br><pre>sudo apt-get install php-ssh2</pre><br>3) Die Verschlüsselung (SSH) muss innerhalb des TS3 Servers zuvor aktiviert werden!<br>Aktiviere die folgenden Parameter in der 'ts3server.ini' und passe diese nach Bedarf an:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>Nach Änderung der TS3 Server Konfiguration ist ein Neustart dessen erforderlich.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 Voice Port<br>Standard ist 9987 (UDP)<br>Dieser Port wird zum Verbinden mit dem TS3 Client genutzt.";
|
||||
$lang['wiverify'] = "Verifizierung-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "User %s (unique Client-ID: %s; Client-database-ID %s) is unknown -> added to the Ranksystem now.";
|
||||
$lang['brute'] = "Much incorrect logins detected on the webinterface. Blocked login for 300 seconds! Last access from IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "User %s (unique Client-ID: %s) got a new TeamSpeak Client-database-ID (%s). Update the old Client-database-ID (%s) and reset collected times!";
|
||||
$lang['crawl'] = "Scanning for connected users and count the activity...";
|
||||
$lang['clean'] = "Scanning for clients to delete...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "sum. idle time";
|
||||
$lang['listsumo'] = "sum. online time";
|
||||
$lang['listuid'] = "unique Client-ID";
|
||||
$lang['login'] = "Login";
|
||||
$lang['msg0001'] = "running version: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Valid commands are:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t get a command list\n[B]!version[/B]\t\t\t\t\t\t\t\t get the Ranksystem version\n[B]!update[/B], [B]!checkupdate[/B]\t\t check for new version and run update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\tget the time to the next rank up\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\trestart the Ranksystem bot\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t stop the Ranksystem bot";
|
||||
$lang['msg0003'] = "You are not eligible for this command!";
|
||||
$lang['msg0004'] = "Client %s (%s) requests shutdown.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 query password<br>Password for the query
|
||||
$lang['wits3querusr'] = "TS3 Query-User";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 query username<br>Default is serveradmin<br>Of course, you can also create an additional serverquery account only for the Ranksystem.<br>The needed permissions you find on:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default is 10011 (TCP)<br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 voice port<br>Default is 9987 (UDP)<br>This is the port, you uses also to connect with the TS3 Client.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "L'utilisateur %s (Identifiant unique: %s; ID dans la base de donnée: %s) est inconnu -> Il vient d'être ajouté dans le Ranksystem.";
|
||||
$lang['brute'] = "Much incorrect logins detected on the webinterface. Blocked login for 300 seconds! Last access from IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "L'utilisateur %s (Identifiant unique: %s) a obtenu un nouveau TeamSpeak ID dans la base de donnée (%s). Mettez à jour l'ancien ID dans la base de donnée (%s) et réinitialisez les heures collectées !";
|
||||
$lang['crawl'] = "Scan des utilisateurs connectés et comptage de leur activité...";
|
||||
$lang['clean'] = "Scan des clients, certains doivent être supprimer...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "Temps d'inactivité";
|
||||
$lang['listsumo'] = "Temps en ligne";
|
||||
$lang['listuid'] = "Identifiant unique de l'utilisateur";
|
||||
$lang['login'] = "S'identifier";
|
||||
$lang['msg0001'] = "version actuelle: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Les commandes valides sont:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t obtenir une liste de commandes\n[B]!version[/B]\t\t\t\t\t\t\t\t obtenir la version du Ranksystem\n[B]!update[/B], [B]!checkupdate[/B]\t\t check for new version and run update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t obtenir le temps pour le prochain rang \n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\tRedémarrer le bot du ranksystem\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t Arrêter le bot du ranksystem";
|
||||
$lang['msg0003'] = "Vous n'êtes pas admissible à cette commande !";
|
||||
$lang['msg0004'] = "Client %s (%s) demmande l'arrêt.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "Mot de passe query du serveur TeamSpeak 3<br>Mot de
|
||||
$lang['wits3querusr'] = "Utilisateur query du TS3";
|
||||
$lang['wits3querusrdesc'] = "Nom d'utilisateur query du serveur TeamSpeak3<br>La valeur par défaut est serveradmin<br>Bien sûr, vous pouvez également créer un compte serverquery supplémentaire uniquement pour le Ranksystem.<br>Les autorisations nécessaires sont trouvable sur:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "Port query TeamSpeak 3<br>La valeur par défaut est 10011 (TCP)<br>Si ce n'est pas par défaut, vous devriez le trouver dans votre 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "Port query TeamSpeak 3<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Si ce n'est pas par défaut, vous devriez le trouver dans votre 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voix-Port";
|
||||
$lang['wits3voicedesc'] = "Port vocal TeamSpeak 3<br>La valeur par défaut est 9987 (UDP)<br>Il s'agit du port, que vous utilisez également pour vous connecter avec le logiciel client TS3.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "L'utente %s ( Client-ID: %s; Client-database-ID %s) non è presente nel database -> L'utente è stato aggiunto al sistema.";
|
||||
$lang['brute'] = "Rilevati molti accessi non corretti nell'interfaccia web. Login bloccato per 300 secondi! Ultimo accesso dall'IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "L'utente %s (unique Client-ID: %s) ha ottenuto un nuovo database-ID (%s). Aggiorna il vecchio Client-database-ID (%s) e resetta il tempo raggiunto!";
|
||||
$lang['crawl'] = "Scansione degli utenti connessi e conteggio delle attività...";
|
||||
$lang['clean'] = "Scansione degli utenti che vanno eliminati...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "Somma del tempo in IDLE";
|
||||
$lang['listsumo'] = "Somma del tempo Online";
|
||||
$lang['listuid'] = "Client-ID Univoco";
|
||||
$lang['login'] = "Login";
|
||||
$lang['msg0001'] = "Versione in uso: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "I comandi validi sono:\n[B]help[/B], [B]info[/B], [B]commands[/B]\t\tvedi la lista dei comandi\n[B]version[/B]\t\t\t\t\t\t\t\t vedi la versione di Ranksystem\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t\t\t vedi il tempo rimasto per aumentare di rank\n[B]restart[/B], [B]reboot[/B]\t\t\t\t\tRiavvia il bot di Ranksystem\n[B]shutdown[/B], [B]quit[/B], [B]stop[/B]\t\t Arresta il bot del Ranksystem";
|
||||
$lang['msg0003'] = "Non sei idoneo per eseguire questo comando!";
|
||||
$lang['msg0004'] = "Il client %s (%s) ha richiesto uno shotdown.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "Password della query di Teamspeak (di norma viene cr
|
||||
$lang['wits3querusr'] = "TS3 - Utente della Query";
|
||||
$lang['wits3querusrdesc'] = "Il nome utente della Query scelta<br>Di default è serveradmin<br>Ma se preferisci potrai creare un ulteriore query solo per il Ranksystem.<br>Per vedere i permessi necessari alla Query guarda:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 - Porta della Query";
|
||||
$lang['wits3querydesc'] = "La porta per l'accesso delle query a Teamspeak<br>La porta di default è 10011 (TCP)<br>Se non è la porta di default e non sai che porta possa essere guarda all'interno del file 'ts3server.ini' nella directory principale del server Teamspeak dove troverai tutte le informazioni sul server.";
|
||||
$lang['wits3querydesc'] = "La porta per l'accesso delle query a Teamspeak<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Se non è la porta di default e non sai che porta possa essere guarda all'interno del file 'ts3server.ini' nella directory principale del server Teamspeak dove troverai tutte le informazioni sul server.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 - Voice-Port";
|
||||
$lang['wits3voicedesc'] = "La voice port del vostro Teamspeak<br>Di default è 9987 (UDP)<br>Questa è inoltre la porta con cui vi connettete al TS3.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "Gebruiker %s (unieke Client-ID: %s; Client-database-ID %s) is onbekend -> zojuist toegevoegd aan ranksysteem.";
|
||||
$lang['brute'] = "Much incorrect logins detected on the webinterface. Blocked login for 300 seconds! Last access from IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "Gebruiker %s (unieke Client-ID: %s) heeft een nieuwe TeamSpeak Client-database-ID (%s). Update de oude Client-database-ID (%s) en reset gecollecteerde tijden!";
|
||||
$lang['crawl'] = "Scannen naar geconnecte gebruikers en de activiteiten aan het optellen...";
|
||||
$lang['clean'] = "Scannen naar clients, die moeten worden verwijderd...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "overzicht inactieve tijd";
|
||||
$lang['listsumo'] = "overzicht online tijd";
|
||||
$lang['listuid'] = "unieke Client-ID";
|
||||
$lang['login'] = "Inloggen";
|
||||
$lang['msg0001'] = "versie: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Valid commands are:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t get a command list\n[B]!version[/B]\t\t\t\t\t\t\t\t get the Ranksystem version\n[B]!update[/B], [B]!checkupdate[/B]\t\t check for new version and run update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t\t\t\tget the time to the next rank up\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\trestart the Ranksystem bot\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t stop the Ranksystem bot";
|
||||
$lang['msg0003'] = "Je bent niet in beschikking van deze commando!";
|
||||
$lang['msg0004'] = "Client %s (%s) verzoekt afsluiten.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 query password<br>Password for the query
|
||||
$lang['wits3querusr'] = "TS3 Query-User";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 query username<br>Default is serveradmin<br>Of course, you can also create an additional serverquery account only for the Ranksystem.<br>The needed permissions you find on:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default is 10011 (TCP)<br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query port<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>If its not default, you should find it in your 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 voice port<br>Default is 9987 (UDP)<br>This is the port, you uses also to connect with the TS3 Client.";
|
||||
$lang['wiverify'] = "Verification-Channel";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "User %s (unique Client-ID: %s; Client-database-ID %s) is unknown -> added to the Ranksystem now.";
|
||||
$lang['brute'] = "Wykryto wiele niepoprawnych logowan na WWW Zablokowane logowanie przez 300 sekund! Ostatni dostep z IP% s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "Uzytkownik %s (unique Client-ID: %s) ma nowy identyfikator klienta TeamSpeak (%s). Zaktualizuj stary identyfikator bazy danych klienta (%s). i zresetuj zebrany czasy!";
|
||||
$lang['crawl'] = "Skanowanie dla podłączonych uzytkownikow i zliczanie aktywnosci...";
|
||||
$lang['clean'] = "Skanowanie w celu usuniecia klientow...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "suma. czas bezczynnosci";
|
||||
$lang['listsumo'] = "suma. czas online";
|
||||
$lang['listuid'] = "unikalny identyfikator klienta";
|
||||
$lang['login'] = "Zaloguj Sie";
|
||||
$lang['msg0001'] = "Uruchomiona wersja: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Prawidłowe polecenia to:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B]\t\t otrzymują liste polecen\n[B]!version[/B]\t\t\t\t\t\t\t\t pobierz wersje systemu Ranksystem\n[B]!update[/B], [B]!checkupdate[/B]\t\t sprawdz dla nowej wersji i uruchamiania aktualizacji\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t rozpoczyna czyszczenie bazy uzytkownikow\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t\t\t\tget czas na kolejną range\n[B]!restart[/B], [B]!reboot[/B]\t\t\t\t\trestart bota Ranksystem\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B]\t\t zatrzymaj bota Ranksystem";
|
||||
$lang['msg0003'] = "Nie kwalifikujesz sie do tego polecenia!";
|
||||
$lang['msg0004'] = "Klient %s (%s) ząda zamkniecia systemu.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "Hasło do zapytania TeamSpeak 3<br>Hasło dla uzytko
|
||||
$lang['wits3querusr'] = "Uzytkownik zapytan TS3";
|
||||
$lang['wits3querusrdesc'] = "Nazwa uzytkownika zapytania TeamSpeak 3<br>Domyslna wartosc to serveradmin<br>Oczywiscie, mozesz takze utworzyc dodatkowe konto serwerowe tylko dla systemu Ranksystem.<br>Potrzebne uprawnienia, ktore mozna znalezc:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS-Query-Port";
|
||||
$lang['wits3querydesc'] = "Port zapytania TeamSpeak 3<br>Domyslna wartosc to 10011 (TCP)<br>Jesli nie jest domyslny, powinienes go znalezc w swoim 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "Port zapytania TeamSpeak 3<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Jesli nie jest domyslny, powinienes go znalezc w swoim 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "Port głosowy TS3";
|
||||
$lang['wits3voicedesc'] = "Port głosowy TeamSpeak 3<br>Domyslna wartosc to 9987 (UDP)<br>To jest port, ktorego uzywasz rowniez do łączenia sie z klientem TS3.";
|
||||
$lang['wiverify'] = "Weryfikacja - kanał";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "O usuário %s (ID-Ùnica: %s; Cliente-banco de dados-ID %s) é desconhecido -> adicionado ao sistema de ranking agora.";
|
||||
$lang['brute'] = "Muitos logins incorretos detectados na interface da web. Acesso bloqueado por 300 segundos! Último acesso pelo IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "O usuário %s (ID-Ùnica:: %s) obteve um novo ID no banco de dados do teamspeak (%s). Atualize o antigo Client-banco de dados-ID (%s) e reinicie os tempos coletados!";
|
||||
$lang['crawl'] = "Procure o usuário conectado e conte a atividade...";
|
||||
$lang['clean'] = "Procurando por clientes, que devem ser excluidos...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "Tempo total afk";
|
||||
$lang['listsumo'] = "Tempo total Online";
|
||||
$lang['listuid'] = "ID ùnica";
|
||||
$lang['login'] = "Entrar";
|
||||
$lang['msg0001'] = "versão em execução: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Os comandos válidos são:\n[B]help[/B], [B]info[/B], [B]commands[/B]\t\tget a command list\n[B]version[/B]\t\t\t\t\t\t\t\t get the Ranksystem version\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t\t\t get the time to the next rank up\n[B]restart[/B], [B]reboot[/B]\t\t\t\t\trestart the Ranksystem bot\n[B]shutdown[/B], [B]quit[/B], [B]stop[/B]\t\t stop the Ranksystem bot";
|
||||
$lang['msg0003'] = "Você não é elegível para usar este comando!";
|
||||
$lang['msg0004'] = "Cliente %s (%s) fez o pedido de desligamento.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 senha query<br>Senha para o usuário da
|
||||
$lang['wits3querusr'] = "TS3 Usuário-query";
|
||||
$lang['wits3querusrdesc'] = "Nome de usuário da consulta TeamSpeak 3<br>O padrão é serveradmin<br>Claro, você também pode criar uma conta de serverquery adicional somente para o Sistema de ranking.<br>As permissões necessárias que você encontra em:<br>http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Porta-query";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 porta query<br>O padrão é 10011 (TCP)<br>Se não for padrão, você deve encontrar a sua em 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 porta query<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Se não for padrão, você deve encontrar a sua em 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Porta de voz";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 porta de voz<br>O padrão é 9987 (UDP)<br>Esta é a porta, que você também usa para se conectar ao TS3 Client.";
|
||||
$lang['wiverify'] = "Verificação-Canal";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "Userul %s (unique Client-ID: %s; Client-database-ID %s) este necunoscut -> adaugat la Sistem Rank acum.";
|
||||
$lang['brute'] = "Au fost detectate prea multe conectari incorecte pe interfata web. Au fost blocate datele de conectare timp de 300 de secunde! Ultimul acces de pe IP: %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "Userul %s (unique Client-ID: %s) a primit un noua identitate (%s). Actualizam vechea identitate (%s) ?i resetam timpul colectat!";
|
||||
$lang['crawl'] = "Scanam clientul conectat ?i contorizam activitatea...";
|
||||
$lang['clean'] = "Scanam clien?ii care trebuie ?ter?i...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "sum. timpul de inactivitate";
|
||||
$lang['listsumo'] = "sum. timp online";
|
||||
$lang['listuid'] = "unique-ID";
|
||||
$lang['login'] = "Logare";
|
||||
$lang['msg0001'] = "versiune: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Comenzi valide:\n[B]!help[/B], [B]!info[/B], [B]!commands[/B] - primeste lista de comenzi\n[B]!version[/B] - vezi versiunea sistemlui\n[B]!update[/B], [B]!checkupdate[/B] - incearca versiune noua\n[B]!clean[/B] - sterge userii din baza de date\n[B]!next[/B], [B]nextup[/B] - primeste timpul pentru urmatorul rank\n[B]!restart[/B], [B]!reboot[/B] - restart\n[B]!shutdown[/B], [B]!quit[/B], [B]!stop[/B] - stop";
|
||||
$lang['msg0003'] = "Nu ai acces pentru aceste comenzi!";
|
||||
$lang['msg0004'] = "Userul %s (%s) a oprit botul.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak3 parola query<br>Parola pentru query.";
|
||||
$lang['wits3querusr'] = "TS3 nume query";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak3 nume query<br>Implicit este serveradmin<br>Desigur, pute?i crea, de asemenea, un cont suplimentar serverquery doar pentru sistemul Ranks.<br> Permisiile necesare pe care le gasi?i pe: http://ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Port";
|
||||
$lang['wits3querydesc'] = "TeamSpeak3 query port<br>Implicit este 10011 (TCP)<br>Daca acesta nu este implicit, il gasesti in \"ts3server.ini\".";
|
||||
$lang['wits3querydesc'] = "TeamSpeak3 query port<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Daca acesta nu este implicit, il gasesti in \"ts3server.ini\".";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Port";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak3 port<br>Implicit este 9987 (UDP)<br>Acest port ajuta la conectarea userilor pe TS3.";
|
||||
$lang['wiverify'] = "Canal de verificare";
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
$lang = array();
|
||||
$lang['adduser'] = "Пользователь %s (UID: %s; DBID: %s) неизвестен и был успешно добавлен в базу данных системы рангов.";
|
||||
$lang['brute'] = "Слишком много некорректных попыток входа в веб-интерфейс. Вы были заблокированы на 300 секунд! Последний успешный вход был выполен с IP %s.";
|
||||
$lang['brute1'] = "Incorrect login attempt on the webinterface detected. Failed access attempt from IP %s with username %s.";
|
||||
$lang['brute2'] = "Successful login attempt to the webinterface from IP %s.";
|
||||
$lang['changedbid'] = "У пользователя %s (UID: %s) изменился TeamSpeak DBID (%s). Обновляем старый Client-DBID (%s) и сбрасываем ему старое время!";
|
||||
$lang['crawl'] = "Сканирование активности подключенных пользователей...";
|
||||
$lang['clean'] = "Сканирование пользователей, подлежащих удалению из базы системы рангов...";
|
||||
@@ -86,7 +88,7 @@ $lang['listsumi'] = "Сумм. время простоя";
|
||||
$lang['listsumo'] = "Сумм. время подключения";
|
||||
$lang['listuid'] = "Уникальный ID клиента(UID)";
|
||||
$lang['login'] = "Авторизоваться";
|
||||
$lang['msg0001'] = "используемая версия: %s";
|
||||
$lang['msg0001'] = "The Ranksystem is running on version: %s";
|
||||
$lang['msg0002'] = "Список доступных команд:\n[B]help[/B], [B]info[/B], [B]commands[/B]\t\t выводят список доступных команд\n[B]version[/B]\t\t\t\t\t\t\t\t выводит информацию о версии системы рангов\n[B]!update[/B], [B]!checkupdate[/B]\t\t check for new version and run update\n[B]!clean[/B]\t\t\t\t\t\t\t\t\t start cleaning of the user database\n[B]!next[/B], [B]!nextup[/B]\t\t\t\t\t\t выводит время, через которое произойдет повышение ранга\n[B]restart[/B], [B]reboot[/B]\t\t\t\t\tперезапускают систему рангов\n[B]shutdown[/B], [B]quit[/B], [B]stop[/B]\t\t выключают систему рангов";
|
||||
$lang['msg0003'] = "У вас нет доступа для выполнения данной команды!";
|
||||
$lang['msg0004'] = "Клиент %s (%s) выключил систему рангов.";
|
||||
@@ -531,7 +533,9 @@ $lang['wits3querpwdesc'] = "TeamSpeak 3 query-Пароль<br>Ваш парол
|
||||
$lang['wits3querusr'] = "TS3 Query-Логин";
|
||||
$lang['wits3querusrdesc'] = "TeamSpeak 3 query-Логин<br>По умолчанию: serveradmin<br>Конечно вы можете указать другой логин для системы рангов.<br>Необходимые разрешения привилегий вы можете найти на:<br>//ts-n.net/ranksystem.php";
|
||||
$lang['wits3query'] = "TS3 Query-Порт";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query-Порт<br>По умолчанию: 10011 (TCP)<br>Если порт изменен, то укажите его согласно настройкам из 'ts3server.ini'.";
|
||||
$lang['wits3querydesc'] = "TeamSpeak 3 query-Порт<br>Default RAW (plain text) is 10011 (TCP)<br>Default SSH (encrypted) is 10022 (TCP)<br><br>Если порт изменен, то укажите его согласно настройкам из 'ts3server.ini'.";
|
||||
$lang['wits3encrypt'] = "TS3 Query encryption";
|
||||
$lang['wits3encryptdesc'] = "Activate this option to encrypt the communication between the Ranksystem and the TeamSpeak 3 server (SSH).<br>When this function is disabled, the communication will be done in plain text (RAW). This could be a security risk, especially when the TS3 server and the Ranksystem are running on different machines.<br><br>Be also sure, you have checked the TS3 Query Port, which needs (perhaps) to be changed in the Ranksystem!<br><br><b>Attention:</b> The SSH encryption needs more CPU time and with this truly more system resources. That's why we recommend to use a RAW connection (disabled encryption) if the TS3 server and the Ranksystem are running on the same machine / server (localhost / 127.0.0.1). If they are running on separate machines, you should activate the encrypted connection!<br><br><b>Requirements:</b><br><br>1) TS3 Server version 3.3.0 or above.<br><br>2) The PHP extension PHP-SSH2 is necessary.<br>On Linux you can it install with the following command:<br><pre>sudo apt-get install php-ssh2</pre><br>3) The encryption needs to be enabled on your TS3 server!<br>Activate the following parameters inside your 'ts3server.ini' and customize it for your needs:<br><pre>query_ssh_ip=0.0.0.0,::<br>query_ssh_port=10022<br>query_protocols=ssh,raw<br>query_ssh_rsa_host_key=ssh_host_rsa_key</pre>After changing your TS3 server configurations a restart of your TS3 server is necessary.";
|
||||
$lang['wits3voice'] = "TS3 Voice-Порт";
|
||||
$lang['wits3voicedesc'] = "TeamSpeak 3 voice-Порт<br>По умолчанию: 9987 (UDP)<br>Этот порт используется Teamspeak 3 клиентом для подключения к серверу.";
|
||||
$lang['wiverify'] = "Канал для верификации";
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: Blacklist.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_Blacklist
|
||||
* @brief Provides methods to check if an IP address is currently blacklisted.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_Blacklist extends TeamSpeak3_Adapter_Abstract
|
||||
{
|
||||
/**
|
||||
* The IPv4 address or FQDN of the TeamSpeak Systems update server.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $default_host = "blacklist.teamspeak.com";
|
||||
|
||||
/**
|
||||
* The UDP port number of the TeamSpeak Systems update server.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $default_port = 17385;
|
||||
|
||||
/**
|
||||
* Stores an array containing the latest build numbers.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $build_numbers = null;
|
||||
|
||||
/**
|
||||
* Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote
|
||||
* server.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function syn()
|
||||
{
|
||||
if(!isset($this->options["host"]) || empty($this->options["host"])) $this->options["host"] = $this->default_host;
|
||||
if(!isset($this->options["port"]) || empty($this->options["port"])) $this->options["port"] = $this->default_port;
|
||||
|
||||
$this->initTransport($this->options, "TeamSpeak3_Transport_UDP");
|
||||
$this->transport->setAdapter($this);
|
||||
|
||||
TeamSpeak3_Helper_Profiler::init(spl_object_hash($this));
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("blacklistConnected", $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The TeamSpeak3_Adapter_Blacklist destructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if($this->getTransport() instanceof TeamSpeak3_Transport_Abstract && $this->getTransport()->isConnected())
|
||||
{
|
||||
$this->getTransport()->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if a specified $host IP address is currently blacklisted.
|
||||
*
|
||||
* @param string $host
|
||||
* @throws TeamSpeak3_Adapter_Blacklist_Exception
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBlacklisted($host)
|
||||
{
|
||||
if(ip2long($host) === FALSE)
|
||||
{
|
||||
$addr = gethostbyname($host);
|
||||
|
||||
if($addr == $host)
|
||||
{
|
||||
throw new TeamSpeak3_Adapter_Blacklist_Exception("unable to resolve IPv4 address (" . $host . ")");
|
||||
}
|
||||
|
||||
$host = $addr;
|
||||
}
|
||||
|
||||
$this->getTransport()->send("ip4:" . $host);
|
||||
$repl = $this->getTransport()->read(1);
|
||||
$this->getTransport()->disconnect();
|
||||
|
||||
if(!count($repl))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return ($repl->toInt()) ? FALSE : TRUE;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_Blacklist_Exception
|
||||
* @brief Enhanced exception class for TeamSpeak3_Adapter_Blacklist objects.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_Blacklist_Exception extends TeamSpeak3_Adapter_Exception {}
|
||||
@@ -26,4 +26,47 @@
|
||||
* @class TeamSpeak3_Adapter_ServerQuery_Exception
|
||||
* @brief Enhanced exception class for TeamSpeak3_Adapter_ServerQuery objects.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_ServerQuery_Exception extends TeamSpeak3_Adapter_Exception {}
|
||||
class TeamSpeak3_Adapter_ServerQuery_Exception extends TeamSpeak3_Adapter_Exception
|
||||
{
|
||||
/**
|
||||
* Stores the optional return code for ServerQuery errors.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $return_code = null;
|
||||
|
||||
/**
|
||||
* The TeamSpeak3_Adapter_ServerQuery_Exception constructor.
|
||||
*
|
||||
* @param string $mesg
|
||||
* @param integer $code
|
||||
* @param string $return_code
|
||||
* @return TeamSpeak3_Adapter_ServerQuery_Exception
|
||||
*/
|
||||
public function __construct($mesg, $code = 0x00, $return_code = null)
|
||||
{
|
||||
parent::__construct($mesg, $code);
|
||||
|
||||
$this->return_code = $return_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns TRUE if the exception provides a return code for ServerQuery errors.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function hasReturnCode()
|
||||
{
|
||||
return $this->return_code !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the optional return code for ServerQuery errors.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getReturnCode()
|
||||
{
|
||||
return $this->return_code;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ class TeamSpeak3_Adapter_ServerQuery_Reply
|
||||
$suffix = "";
|
||||
}
|
||||
|
||||
throw new TeamSpeak3_Adapter_ServerQuery_Exception($this->getErrorProperty("msg") . $suffix, $this->getErrorProperty("id"));
|
||||
throw new TeamSpeak3_Adapter_ServerQuery_Exception($this->getErrorProperty("msg") . $suffix, $this->getErrorProperty("id"), $this->getErrorProperty("return_code"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: TSDNS.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_TSDNS
|
||||
* @brief Provides methods to query a TSDNS server.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_TSDNS extends TeamSpeak3_Adapter_Abstract
|
||||
{
|
||||
/**
|
||||
* The TCP port number used by any TSDNS server.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $default_port = 41144;
|
||||
|
||||
/**
|
||||
* Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote
|
||||
* server.
|
||||
*
|
||||
* @throws TeamSpeak3_Adapter_Exception
|
||||
* @return void
|
||||
*/
|
||||
public function syn()
|
||||
{
|
||||
if(!isset($this->options["port"]) || empty($this->options["port"])) $this->options["port"] = $this->default_port;
|
||||
|
||||
$this->initTransport($this->options);
|
||||
$this->transport->setAdapter($this);
|
||||
|
||||
TeamSpeak3_Helper_Profiler::init(spl_object_hash($this));
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("tsdnsConnected", $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The TeamSpeak3_Adapter_FileTransfer destructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if($this->getTransport() instanceof TeamSpeak3_Transport_Abstract && $this->getTransport()->isConnected())
|
||||
{
|
||||
$this->getTransport()->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries the TSDNS server for a specified virtual hostname and returns the result.
|
||||
*
|
||||
* @param string $tsdns
|
||||
* @throws TeamSpeak3_Adapter_TSDNS_Exception
|
||||
* @return TeamSpeak3_Helper_String
|
||||
*/
|
||||
public function resolve($tsdns)
|
||||
{
|
||||
$this->getTransport()->sendLine($tsdns);
|
||||
$repl = $this->getTransport()->readLine();
|
||||
$this->getTransport()->disconnect();
|
||||
|
||||
if($repl->section(":", 0)->toInt() == 404)
|
||||
{
|
||||
throw new TeamSpeak3_Adapter_TSDNS_Exception("unable to resolve TSDNS hostname (" . $tsdns . ")");
|
||||
}
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("tsdnsResolved", $tsdns, $repl);
|
||||
|
||||
return $repl;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_TSDNS_Exception
|
||||
* @brief Enhanced exception class for TeamSpeak3_Adapter_TSDNS objects.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_TSDNS_Exception extends TeamSpeak3_Adapter_Exception {}
|
||||
@@ -1,217 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: Update.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_Update
|
||||
* @brief Provides methods to query the latest TeamSpeak 3 build numbers from the master server.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_Update extends TeamSpeak3_Adapter_Abstract
|
||||
{
|
||||
/**
|
||||
* The IPv4 address or FQDN of the TeamSpeak Systems update server.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $default_host = "update.teamspeak.com";
|
||||
|
||||
/**
|
||||
* The UDP port number of the TeamSpeak Systems update server.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $default_port = 17384;
|
||||
|
||||
/**
|
||||
* Stores an array containing the latest build numbers (integer timestamps).
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $build_datetimes = null;
|
||||
|
||||
/**
|
||||
* Stores an array containing the latest version strings.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $version_strings = null;
|
||||
|
||||
/**
|
||||
* Connects the TeamSpeak3_Transport_Abstract object and performs initial actions on the remote
|
||||
* server.
|
||||
*
|
||||
* @throws TeamSpeak3_Adapter_Update_Exception
|
||||
* @return void
|
||||
*/
|
||||
public function syn()
|
||||
{
|
||||
if(!isset($this->options["host"]) || empty($this->options["host"])) $this->options["host"] = $this->default_host;
|
||||
if(!isset($this->options["port"]) || empty($this->options["port"])) $this->options["port"] = $this->default_port;
|
||||
|
||||
$this->initTransport($this->options, "TeamSpeak3_Transport_UDP");
|
||||
$this->transport->setAdapter($this);
|
||||
|
||||
TeamSpeak3_Helper_Profiler::init(spl_object_hash($this));
|
||||
|
||||
$this->getTransport()->send(TeamSpeak3_Helper_String::fromHex(33));
|
||||
|
||||
if(!preg_match_all("/,?(\d+)#([0-9a-zA-Z\._-]+),?/", $this->getTransport()->read(96), $matches) || !isset($matches[1]) || !isset($matches[2]))
|
||||
{
|
||||
throw new TeamSpeak3_Adapter_Update_Exception("invalid reply from the server");
|
||||
}
|
||||
|
||||
$this->build_datetimes = $matches[1];
|
||||
$this->version_strings = $matches[2];
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("updateConnected", $this);
|
||||
}
|
||||
|
||||
/**
|
||||
* The TeamSpeak3_Adapter_Update destructor.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
if($this->getTransport() instanceof TeamSpeak3_Transport_Abstract && $this->getTransport()->isConnected())
|
||||
{
|
||||
$this->getTransport()->disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current build number for a specified update channel. Note that since version
|
||||
* 3.0.0, the build number represents an integer timestamp. $channel must be set to one of
|
||||
* the following values:
|
||||
*
|
||||
* - stable
|
||||
* - beta
|
||||
* - alpha
|
||||
* - server
|
||||
*
|
||||
* @param string $channel
|
||||
* @throws TeamSpeak3_Adapter_Update_Exception
|
||||
* @return integer
|
||||
*/
|
||||
public function getRev($channel = "stable")
|
||||
{
|
||||
switch($channel)
|
||||
{
|
||||
case "stable":
|
||||
return isset($this->build_datetimes[0]) ? $this->build_datetimes[0] : null;
|
||||
|
||||
case "beta":
|
||||
return isset($this->build_datetimes[1]) ? $this->build_datetimes[1] : null;
|
||||
|
||||
case "alpha":
|
||||
return isset($this->build_datetimes[2]) ? $this->build_datetimes[2] : null;
|
||||
|
||||
case "server":
|
||||
return isset($this->build_datetimes[3]) ? $this->build_datetimes[3] : null;
|
||||
|
||||
default:
|
||||
throw new TeamSpeak3_Adapter_Update_Exception("invalid update channel identifier (" . $channel . ")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current version string for a specified update channel. $channel must be set to
|
||||
* one of the following values:
|
||||
*
|
||||
* - stable
|
||||
* - beta
|
||||
* - alpha
|
||||
* - server
|
||||
*
|
||||
* @param string $channel
|
||||
* @throws TeamSpeak3_Adapter_Update_Exception
|
||||
* @return integer
|
||||
*/
|
||||
public function getVersion($channel = "stable")
|
||||
{
|
||||
switch($channel)
|
||||
{
|
||||
case "stable":
|
||||
return isset($this->version_strings[0]) ? $this->version_strings[0] : null;
|
||||
|
||||
case "beta":
|
||||
return isset($this->version_strings[1]) ? $this->version_strings[1] : null;
|
||||
|
||||
case "alpha":
|
||||
return isset($this->version_strings[2]) ? $this->version_strings[2] : null;
|
||||
|
||||
case "server":
|
||||
return isset($this->version_strings[3]) ? $this->version_strings[3] : null;
|
||||
|
||||
default:
|
||||
throw new TeamSpeak3_Adapter_Update_Exception("invalid update channel identifier (" . $channel . ")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for getRev() using the 'stable' update channel.
|
||||
*
|
||||
* @param string $channel
|
||||
* @return integer
|
||||
*/
|
||||
public function getClientRev()
|
||||
{
|
||||
return $this->getRev("stable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for getRev() using the 'server' update channel.
|
||||
*
|
||||
* @param string $channel
|
||||
* @return integer
|
||||
*/
|
||||
public function getServerRev()
|
||||
{
|
||||
return $this->getRev("server");
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for getVersion() using the 'stable' update channel.
|
||||
*
|
||||
* @param string $channel
|
||||
* @return integer
|
||||
*/
|
||||
public function getClientVersion()
|
||||
{
|
||||
return $this->getVersion("stable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for getVersion() using the 'server' update channel.
|
||||
*
|
||||
* @param string $channel
|
||||
* @return integer
|
||||
*/
|
||||
public function getServerVersion()
|
||||
{
|
||||
return $this->getVersion("server");
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* TeamSpeak 3 PHP Framework
|
||||
*
|
||||
* $Id: Exception.php 06/06/2016 22:27:13 scp@Svens-iMac $
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @package TeamSpeak3
|
||||
* @version 1.1.24
|
||||
* @author Sven 'ScP' Paulsen
|
||||
* @copyright Copyright (c) 2010 by Planet TeamSpeak. All rights reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @class TeamSpeak3_Adapter_Update_Exception
|
||||
* @brief Enhanced exception class for TeamSpeak3_Adapter_Update objects.
|
||||
*/
|
||||
class TeamSpeak3_Adapter_Update_Exception extends TeamSpeak3_Adapter_Exception {}
|
||||
@@ -28,6 +28,20 @@
|
||||
*/
|
||||
class TeamSpeak3_Exception extends Exception
|
||||
{
|
||||
/**
|
||||
* Stores the original error code.
|
||||
*
|
||||
* @var integer
|
||||
*/
|
||||
protected $raw_code = 0x00;
|
||||
|
||||
/**
|
||||
* Stores the original error message.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $raw_mesg = null;
|
||||
|
||||
/**
|
||||
* Stores custom error messages.
|
||||
*
|
||||
@@ -46,6 +60,9 @@ class TeamSpeak3_Exception extends Exception
|
||||
{
|
||||
parent::__construct($mesg, $code);
|
||||
|
||||
$this->raw_code = $code;
|
||||
$this->raw_mesg = $mesg;
|
||||
|
||||
if(array_key_exists((int) $code, self::$messages))
|
||||
{
|
||||
$this->message = $this->prepareCustomMessage(self::$messages[intval($code)]);
|
||||
@@ -112,6 +129,26 @@ class TeamSpeak3_Exception extends Exception
|
||||
unset(self::$messages[(int) $code]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the original error code.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRawCode()
|
||||
{
|
||||
return $this->raw_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the original error message.
|
||||
*
|
||||
* @return integer
|
||||
*/
|
||||
public function getRawMessage()
|
||||
{
|
||||
return $this->raw_mesg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the class from which the exception was thrown.
|
||||
*
|
||||
|
||||
@@ -457,7 +457,7 @@ class TeamSpeak3_Helper_String implements ArrayAccess, Iterator, Countable
|
||||
$pattern[] = "[\xF1-\xF3][\x80-\xBF]{3}"; // planes 4-15
|
||||
$pattern[] = "\xF4[\x80-\x8F][\x80-\xBF]{2}"; // plane 16
|
||||
|
||||
return boolval(preg_match("%(?:" . implode("|", $pattern) . ")+%xs", $this->string));
|
||||
return (bool) preg_match("%(?:" . implode("|", $pattern) . ")+%xs", $this->string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -164,6 +164,29 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
|
||||
return $this->getParent()->customInfo($this["client_database_id"]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates a custom property for the client.
|
||||
*
|
||||
* @param string $ident
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
public function customSet($ident, $value)
|
||||
{
|
||||
$this->getParent()->customSet($this["client_database_id"], $ident, $value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a custom property from the client.
|
||||
*
|
||||
* @param string $ident
|
||||
* @return void
|
||||
*/
|
||||
public function customDelete($ident)
|
||||
{
|
||||
$this->getParent()->customDelete($this["client_database_id"], $ident);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array containing the permission overview of the client.
|
||||
*
|
||||
@@ -282,7 +305,7 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
|
||||
*/
|
||||
public function avatarDownload()
|
||||
{
|
||||
if($this["client_flag_avatar"]->toString() == NULL) return;
|
||||
if($this["client_flag_avatar"] == NULL) return;
|
||||
|
||||
$download = $this->getParent()->transferInitDownload(rand(0x0000, 0xFFFF), 0, $this->avatarGetName());
|
||||
$transfer = TeamSpeak3::factory("filetransfer://" . (strstr($download["host"], ":") !== FALSE ? "[" . $download["host"] . "]" : $download["host"]) . ":" . $download["port"]);
|
||||
@@ -468,4 +491,3 @@ class TeamSpeak3_Node_Client extends TeamSpeak3_Node_Abstract
|
||||
return (string) $this["client_nickname"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -362,16 +362,17 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
|
||||
* Stops the virtual server specified by ID.
|
||||
*
|
||||
* @param integer $sid
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
public function serverStop($sid)
|
||||
public function serverStop($sid, $msg = null)
|
||||
{
|
||||
if($sid == $this->serverSelectedId())
|
||||
{
|
||||
$this->serverDeselect();
|
||||
}
|
||||
|
||||
$this->execute("serverstop", array("sid" => $sid));
|
||||
$this->execute("serverstop", array("sid" => $sid, "reasonmsg" => $msg));
|
||||
$this->serverListReset();
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServerstopped", $this, $sid);
|
||||
@@ -380,13 +381,14 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
|
||||
/**
|
||||
* Stops the entire TeamSpeak 3 Server instance by shutting down the process.
|
||||
*
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
public function serverStopProcess()
|
||||
public function serverStopProcess($msg = null)
|
||||
{
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServershutdown", $this);
|
||||
|
||||
$this->execute("serverprocessstop");
|
||||
$this->execute("serverprocessstop", array("reasonmsg" => $msg));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1162,4 +1164,3 @@ class TeamSpeak3_Node_Host extends TeamSpeak3_Node_Abstract
|
||||
return (string) $this->getAdapterHost();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,23 +70,6 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
|
||||
$this->nodeId = $this->nodeInfo[$index];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a prepared command to the server and returns the result.
|
||||
*
|
||||
* @param string $cmd
|
||||
* @param boolean $throw
|
||||
* @return TeamSpeak3_Adapter_ServerQuery_Reply
|
||||
*/
|
||||
public function request($cmd, $throw = TRUE)
|
||||
{
|
||||
if($this->getId() != $this->getParent()->serverSelectedId())
|
||||
{
|
||||
$this->getParent()->serverSelect($this->getId());
|
||||
}
|
||||
|
||||
return $this->getParent()->request($cmd, $throw);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array filled with TeamSpeak3_Node_Server objects.
|
||||
*
|
||||
@@ -109,6 +92,23 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
|
||||
$this->serverInfo = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a prepared command to the server and returns the result.
|
||||
*
|
||||
* @param string $cmd
|
||||
* @param boolean $throw
|
||||
* @return TeamSpeak3_Adapter_ServerQuery_Reply
|
||||
*/
|
||||
public function request($cmd, $throw = TRUE)
|
||||
{
|
||||
if($this->getId() != $this->getParent()->serverSelectedId())
|
||||
{
|
||||
$this->getParent()->serverSelect($this->getId());
|
||||
}
|
||||
|
||||
return $this->getParent()->request($cmd, $throw);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array filled with TeamSpeak3_Node_Channel objects.
|
||||
*
|
||||
@@ -1941,7 +1941,7 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
|
||||
|
||||
$detail = $this->request("serversnapshotdeploy -mapping " . $data)->toList();
|
||||
|
||||
if(array_key_exists("sid", $detail[0]))
|
||||
if(isset($detail[0]["sid"]))
|
||||
{
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit("notifyServercreated", $this->getParent(), $detail[0]["sid"]);
|
||||
|
||||
@@ -2130,6 +2130,31 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
|
||||
return $this->execute("custominfo", array("cldbid" => $cldbid))->toArray();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates a custom property for the client specified by $cldbid.
|
||||
*
|
||||
* @param integer $cldbid
|
||||
* @param string $ident
|
||||
* @param string $value
|
||||
* @return void
|
||||
*/
|
||||
public function customSet($cldbid, $ident, $value)
|
||||
{
|
||||
$this->execute("customset", array("cldbid" => $cldbid, "ident" => $ident, "value" => $value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a custom property from the client specified by $cldbid.
|
||||
*
|
||||
* @param integer $cldbid
|
||||
* @param string $ident
|
||||
* @return void
|
||||
*/
|
||||
public function customDelete($cldbid, $ident)
|
||||
{
|
||||
$this->execute("customdelete", array("cldbid" => $cldbid, "ident" => $ident));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of active bans on the selected virtual server.
|
||||
*
|
||||
@@ -2347,11 +2372,12 @@ class TeamSpeak3_Node_Server extends TeamSpeak3_Node_Abstract
|
||||
/**
|
||||
* Stops the virtual server.
|
||||
*
|
||||
* @param string $msg
|
||||
* @return void
|
||||
*/
|
||||
public function stop()
|
||||
public function stop($msg = null)
|
||||
{
|
||||
$this->getParent()->serverStop($this->getId());
|
||||
$this->getParent()->serverStop($this->getId(), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -320,10 +320,16 @@ class TeamSpeak3
|
||||
$uri = new TeamSpeak3_Helper_Uri($uri);
|
||||
|
||||
$adapter = self::getAdapterName($uri->getScheme());
|
||||
$options = array("host" => $uri->getHost(), "port" => $uri->getPort(), "timeout" => (int) $uri->getQueryVar("timeout", 10), "blocking" => (int) $uri->getQueryVar("blocking", 1), "tls" => (int) $uri->getQueryVar("tls", 0));
|
||||
$options = array("host" => $uri->getHost(), "port" => $uri->getPort(), "timeout" => (int) $uri->getQueryVar("timeout", 10), "blocking" => (int) $uri->getQueryVar("blocking", 1), "tls" => (int) $uri->getQueryVar("tls", 0), "ssh" => (int) $uri->getQueryVar("ssh", 0));
|
||||
|
||||
self::loadClass($adapter);
|
||||
|
||||
if($options["ssh"])
|
||||
{
|
||||
$options["username"] = $uri->getUser();
|
||||
$options["password"] = $uri->getPass();
|
||||
}
|
||||
|
||||
$object = new $adapter($options);
|
||||
|
||||
if($object instanceof TeamSpeak3_Adapter_ServerQuery)
|
||||
|
||||
@@ -42,6 +42,13 @@ abstract class TeamSpeak3_Transport_Abstract
|
||||
*/
|
||||
protected $stream = null;
|
||||
|
||||
/**
|
||||
* Stores an optional stream session for the connection.
|
||||
*
|
||||
* @var session
|
||||
*/
|
||||
protected $session = null;
|
||||
|
||||
/**
|
||||
* Stores the TeamSpeak3_Adapter_Abstract object using this transport.
|
||||
*
|
||||
|
||||
@@ -40,12 +40,15 @@ class TeamSpeak3_Transport_TCP extends TeamSpeak3_Transport_Abstract
|
||||
|
||||
$host = strval($this->config["host"]);
|
||||
$port = strval($this->config["port"]);
|
||||
$timeout = intval($this->config["timeout"]);
|
||||
$blocking = intval($this->config["blocking"]);
|
||||
|
||||
if(empty($this->config["ssh"]))
|
||||
{
|
||||
$address = "tcp://" . (strstr($host, ":") !== FALSE ? "[" . $host . "]" : $host) . ":" . $port;
|
||||
$options = empty($this->config["tls"]) ? array() : array("ssl" => array("allow_self_signed" => TRUE, "verify_peer" => FALSE, "verify_peer_name" => FALSE));
|
||||
$timeout = (int) $this->config["timeout"];
|
||||
|
||||
$this->stream = @stream_socket_client($address, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options));
|
||||
$this->stream = @stream_socket_client($address, $errno, $errstr, $this->config["timeout"], STREAM_CLIENT_CONNECT, stream_context_create($options));
|
||||
|
||||
if($this->stream === FALSE)
|
||||
{
|
||||
@@ -56,9 +59,31 @@ class TeamSpeak3_Transport_TCP extends TeamSpeak3_Transport_Abstract
|
||||
{
|
||||
stream_socket_enable_crypto($this->stream, TRUE, STREAM_CRYPTO_METHOD_SSLv23_CLIENT);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session = @ssh2_connect($host, $port);
|
||||
|
||||
if($this->session === FALSE)
|
||||
{
|
||||
throw new TeamSpeak3_Transport_Exception("failed to establish secure shell connection to server '" . $this->config["host"] . ":" . $this->config["port"] . "'");
|
||||
}
|
||||
|
||||
if(!@ssh2_auth_password($this->session, $this->config["username"], $this->config["password"]))
|
||||
{
|
||||
throw new TeamSpeak3_Adapter_ServerQuery_Exception("invalid loginname or password", 0x208);
|
||||
}
|
||||
|
||||
$this->stream = @ssh2_shell($this->session, "raw");
|
||||
|
||||
if($this->stream === FALSE)
|
||||
{
|
||||
throw new TeamSpeak3_Transport_Exception("failed to open a secure shell on server '" . $this->config["host"] . ":" . $this->config["port"] . "'");
|
||||
}
|
||||
}
|
||||
|
||||
@stream_set_timeout($this->stream, $timeout);
|
||||
@stream_set_blocking($this->stream, $this->config["blocking"] ? 1 : 0);
|
||||
@stream_set_blocking($this->stream, $blocking ? 1 : 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,6 +97,11 @@ class TeamSpeak3_Transport_TCP extends TeamSpeak3_Transport_Abstract
|
||||
|
||||
$this->stream = null;
|
||||
|
||||
if(is_resource($this->session))
|
||||
{
|
||||
@ssh2_disconnect($this->session);
|
||||
}
|
||||
|
||||
TeamSpeak3_Helper_Signal::getInstance()->emit(strtolower($this->getAdapterType()) . "Disconnected");
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ if (isset($mysqlcon) && ($config = $mysqlcon->query("SELECT * FROM `$dbname`.`co
|
||||
if(count($config) != 0) {
|
||||
$ts['host'] = $config['tshost'];
|
||||
$ts['query'] = $config['tsquery'];
|
||||
$ts['tsencrypt'] = $config['tsencrypt'];
|
||||
$ts['voice'] = $config['tsvoice'];
|
||||
$ts['user'] = $config['tsuser'];
|
||||
$ts['pass'] = $config['tspass'];
|
||||
|
||||
@@ -3,13 +3,21 @@
|
||||
## This are only examples
|
||||
## If you miss one, feel free to add it
|
||||
## Only one command should be active at the same time!
|
||||
##
|
||||
## Default, which should normally working on Linux and Windows
|
||||
$phpcommand = "php";
|
||||
##
|
||||
## Linux
|
||||
#$phpcommand = "php56";
|
||||
#$phpcommand = "php70";
|
||||
#$phpcommand = "/usr/bin/php5";
|
||||
#$phpcommand = "/usr/bin/php7.2";
|
||||
#$phpcommand = "C:\PHP5\php.exe";
|
||||
#$phpcommand = "C:\PHP7\php.exe";
|
||||
#$phpcommand = "\"C:\Program Files (x86)\PHP\php.exe\""; // on blanks you need special marks \"
|
||||
#$phpcommand = "c:\wamp\bin\php\php.exe";
|
||||
##
|
||||
## Windows
|
||||
#$phpcommand = 'C:\PHP5\php.exe';
|
||||
#$phpcommand = 'C:\PHP7\php.exe';
|
||||
#$phpcommand = 'c:\wamp\bin\php\php.exe';
|
||||
#$phpcommand = 'c:\xampp\php\php.exe';
|
||||
# On blanks inside the path you need to escape these with special marks --> \" <-- at the beginning and end of the path, see example below
|
||||
#$phpcommand = '\"C:\Program Files (x86)\PHP\php.exe\"';
|
||||
?>
|
||||
@@ -236,7 +236,7 @@ if((time() - $job_check['last_update']['timestamp']) < 259200 && !isset($_SESSIO
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><?PHP echo ' ' . $_SESSION[$rspathhex.'tsname'] ?>
|
||||
<b class="caret"></b></a><ul class="dropdown-menu">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'tsname'] == $lang['stag0016'] || $_SESSION[$rspathhex.'connected'] == 0) {
|
||||
if($_SESSION[$rspathhex.'tsname'] == $lang['stag0016'] || $_SESSION[$rspathhex.'tsname'] == "verification needed (multiple)!" || $_SESSION[$rspathhex.'connected'] == 0) {
|
||||
echo '<li><a href="verify.php"><i class="fa fa-fw fa-key"></i> '.$lang['stag0017'].'</a></li>';
|
||||
}
|
||||
if(isset($_SESSION[$rspathhex.'admin']) && $_SESSION[$rspathhex.'admin'] == TRUE) {
|
||||
|
||||
@@ -21,12 +21,6 @@ if(!isset($_SESSION[$rspathhex.'tsuid'])) {
|
||||
set_session_ts3($ts['voice'], $mysqlcon, $dbname, $language, $adminuuid);
|
||||
}
|
||||
|
||||
if (isset($_POST['verify']) && $_POST['csrf_token'] != $_SESSION[$rspathhex.'csrf_token']) {
|
||||
echo $lang['errcsrf'];
|
||||
rem_session_ts3($rspathhex);
|
||||
exit;
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['token']) && isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
if($_REQUEST['token'] == NULL) {
|
||||
$err_msg = $lang['stve0003']; $err_lvl = 1;
|
||||
@@ -91,10 +85,14 @@ if((!isset($_SESSION[$rspathhex.'multiple']) || count($_SESSION[$rspathhex.'mult
|
||||
$err_msg = $lang['stve0005']; $err_lvl = 1;
|
||||
}
|
||||
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid']) && $_POST['csrf_token'] == $_SESSION[$rspathhex.'csrf_token']) {
|
||||
if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid'])) {
|
||||
require_once('../libs/ts3_lib/TeamSpeak3.php');
|
||||
try {
|
||||
if($ts['tsencrypt'] == 1) {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&ssh=1");
|
||||
} else {
|
||||
$ts3 = TeamSpeak3::factory("serverquery://".rawurlencode($ts['user']).":".rawurlencode($ts['pass'])."@".$ts['host'].":".$ts['query']."/?server_port=".$ts['voice']."&blocking=0");
|
||||
}
|
||||
|
||||
try {
|
||||
usleep($slowmode);
|
||||
@@ -134,8 +132,6 @@ if(isset($_POST['uuid']) && !isset($_SESSION[$rspathhex.'temp_uuid']) && $_POST[
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION[$rspathhex.'csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
|
||||
require_once('nav.php');
|
||||
?>
|
||||
<div id="page-wrapper">
|
||||
@@ -152,7 +148,6 @@ require_once('nav.php');
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<form name="verify" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="<?PHP echo $_SESSION[$rspathhex.'csrf_token']; ?>">
|
||||
<?PHP
|
||||
if($_SESSION[$rspathhex.'connected'] == 0) {
|
||||
$ts3link = '<a href="ts3server://';
|
||||
|
||||
@@ -51,14 +51,14 @@ require_once('nav.php');
|
||||
|
||||
if(!isset($_POST['number']) || $_POST['number'] == "yes") {
|
||||
$_SESSION[$rspathhex.'showexcepted'] = "yes";
|
||||
$filter = " `except`='0'";
|
||||
$filter = " WHERE `except`='0'";
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'showexcepted'] = "no";
|
||||
$filter = "";
|
||||
}
|
||||
|
||||
if(($dbuserdata = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` WHERE $filter ORDER BY `name` ASC")) === false) {
|
||||
$err_msg = "DB Error: ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
if(($dbuserdata = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` $filter ORDER BY `name` ASC")) === false) {
|
||||
$err_msg = "DB Error1: ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
$user_arr = $dbuserdata->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
|
||||
@@ -51,13 +51,13 @@ require_once('nav.php');
|
||||
|
||||
if(!isset($_POST['number']) || $_POST['number'] == "yes") {
|
||||
$_SESSION[$rspathhex.'showexcepted'] = "yes";
|
||||
$filter = " `except`='0'";
|
||||
$filter = " WHERE `except`='0'";
|
||||
} else {
|
||||
$_SESSION[$rspathhex.'showexcepted'] = "no";
|
||||
$filter = "";
|
||||
}
|
||||
|
||||
if(($dbuserdata = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` WHERE $filter ORDER BY `name` ASC")) === false) {
|
||||
if(($dbuserdata = $mysqlcon->query("SELECT `uuid`,`cldbid`,`name` FROM `$dbname`.`user` $filter ORDER BY `name` ASC")) === false) {
|
||||
$err_msg = "DB Error: ".print_r($mysqlcon->errorInfo(), true); $err_lvl = 3;
|
||||
}
|
||||
$user_arr = $dbuserdata->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
@@ -13,7 +13,7 @@ session_start();
|
||||
require_once('../other/config.php');
|
||||
require_once('../other/phpcommand.php');
|
||||
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
function enter_logfile($logpath,$timezone,$loglevel,$logtext,$norotate = false) {
|
||||
$file = $logpath.'ranksystem.log';
|
||||
if ($loglevel == 1) {
|
||||
$loglevel = " CRITICAL ";
|
||||
@@ -25,27 +25,22 @@ function enter_logfile($logpath,$timezone,$loglevel,$logtext) {
|
||||
$loglevel = " NOTICE ";
|
||||
} elseif ($loglevel == 5) {
|
||||
$loglevel = " INFO ";
|
||||
} elseif ($loglevel == 6) {
|
||||
$loglevel = " DEBUG ";
|
||||
}
|
||||
$input = DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n";
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, $input);
|
||||
if (filesize($file) > 5242880) {
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ").$loglevel.$logtext."\n");
|
||||
fclose($loghandle);
|
||||
if($norotate == false && filesize($file) > 5242880) {
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Logfile filesie of 5 MiB reached.. Rotate logfile.\n");
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Restart Bot to continue with new log file...\n");
|
||||
fclose($loghandle);
|
||||
$file2 = "$file.old";
|
||||
if (file_exists($file2)) unlink($file2);
|
||||
rename($file, $file2);
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
exec("del /F ".substr(__DIR__,0,-12).'logs/pid');
|
||||
$WshShell = new COM("WScript.Shell");
|
||||
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".substr(__DIR__,0,-12)."worker.php start", 0, false);
|
||||
exit;
|
||||
} else {
|
||||
exec("rm -f ".substr(__DIR__,0,-12).'logs/pid');
|
||||
exec($phpcommand." ".substr(__DIR__,0,-12)."worker.php start");
|
||||
exit;
|
||||
}
|
||||
$loghandle = fopen($file, 'a');
|
||||
fwrite($loghandle, DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''))->setTimeZone(new DateTimeZone($timezone))->format("Y-m-d H:i:s.u ")." NOTICE Rotated logfile...\n");
|
||||
fclose($loghandle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,11 +82,13 @@ if(($last_access[0]['last_access'] + 1) >= time()) {
|
||||
$_SESSION[$rspathhex.'clientip'] = getclientip();
|
||||
$_SESSION[$rspathhex.'newversion'] = $newversion;
|
||||
$_SESSION[$rspathhex.'csrf_token'] = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
enter_logfile($logpath,$timezone,6,sprintf($lang['brute2'], getclientip()));
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `count_access`='0'") === false) { }
|
||||
header("Location: //".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."/bot.php");
|
||||
exit;
|
||||
} elseif(isset($_POST['username'])) {
|
||||
$nowtime = time();
|
||||
enter_logfile($logpath,$timezone,5,sprintf($lang['brute1'], getclientip(), $_POST['username']));
|
||||
if($mysqlcon->exec("UPDATE `$dbname`.`config` SET `last_access`='$nowtime',`count_access`=`count_access` + 1") === false) { }
|
||||
$err_msg = $lang['errlogin'];
|
||||
$err_lvl = 3;
|
||||
|
||||
@@ -173,7 +173,7 @@ if($adminuuid==NULL && $_SESSION[$rspathhex.'username'] == $webuser && !isset($e
|
||||
$err_msg = $lang['winav11']; $err_lvl = 3;
|
||||
}
|
||||
|
||||
if(!isset($_SERVER['HTTPS']) && !isset($err_msg) || $_SERVER['HTTPS'] != "on" && !isset($err_msg)) {
|
||||
if(!isset($_SERVER['HTTPS']) && !isset($err_msg) || isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != "on" && !isset($err_msg)) {
|
||||
$host = "<a href=\"https://".$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['PHP_SELF']), '/\\')."\">";
|
||||
$err_msg = sprintf($lang['winav10'], $host,'</a>!<br>', '<br>'); $err_lvl = 2;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ $newcsrf = bin2hex(openssl_random_pseudo_bytes(32));
|
||||
if (isset($_POST['update']) && $_SESSION[$rspathhex.'username'] == $webuser && $_SESSION[$rspathhex.'password'] == $webpass && $_SESSION[$rspathhex.'clientip'] == getclientip() && $_POST['csrf_token'] == $_SESSION[$rspathhex.'csrf_token']) {
|
||||
$tshost = $_POST['tshost'];
|
||||
$tsquery = $_POST['tsquery'];
|
||||
if (isset($_POST['tsencrypt'])) $tsencrypt = 1; else $tsencrypt = 0;
|
||||
$tsvoice = $_POST['tsvoice'];
|
||||
$tsuser = $_POST['tsuser'];
|
||||
$tspass = $_POST['tspass'];
|
||||
@@ -60,7 +61,7 @@ if (isset($_POST['update']) && $_SESSION[$rspathhex.'username'] == $webuser && $
|
||||
$defchid = $_POST['defchid'];
|
||||
$slowmode = $_POST['slowmode'];
|
||||
$avatar_delay= $_POST['avatar_delay'];
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `tshost`='$tshost',`tsquery`='$tsquery',`tsvoice`='$tsvoice',`tsuser`='$tsuser',`tspass`='$tspass',`queryname`='$queryname',`queryname2`='$queryname2',`slowmode`='$slowmode',`defchid`='$defchid',`avatar_delay`='$avatar_delay'") === false) {
|
||||
if ($mysqlcon->exec("UPDATE `$dbname`.`config` SET `tshost`='$tshost',`tsencrypt`='$tsencrypt',`tsquery`='$tsquery',`tsvoice`='$tsvoice',`tsuser`='$tsuser',`tspass`='$tspass',`queryname`='$queryname',`queryname2`='$queryname2',`slowmode`='$slowmode',`defchid`='$defchid',`avatar_delay`='$avatar_delay'") === false) {
|
||||
$err_msg = print_r($mysqlcon->errorInfo(), true);
|
||||
$err_lvl = 3;
|
||||
} else {
|
||||
@@ -70,6 +71,7 @@ if (isset($_POST['update']) && $_SESSION[$rspathhex.'username'] == $webuser && $
|
||||
}
|
||||
$ts['host'] = $_POST['tshost'];
|
||||
$ts['query'] = $_POST['tsquery'];
|
||||
$ts['tsencrypt']= $tsencrypt;
|
||||
$ts['voice'] = $_POST['tsvoice'];
|
||||
$ts['user'] = $_POST['tsuser'];
|
||||
$ts['pass'] = $_POST['tspass'];
|
||||
@@ -101,6 +103,16 @@ $_SESSION[$rspathhex.'csrf_token'] = $newcsrf;
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3encryptdesc"><?php echo $lang['wits3encrypt']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8">
|
||||
<?PHP if ($ts['tsencrypt'] == 1) {
|
||||
echo '<input class="switch-animate" type="checkbox" checked data-size="mini" name="tsencrypt" value="',$ts['tsencrypt'],'">';
|
||||
} else {
|
||||
echo '<input class="switch-animate" type="checkbox" data-size="mini" name="tsencrypt" value="',$ts['tsencrypt'],'">';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label" data-toggle="modal" data-target="#wits3querydesc"><?php echo $lang['wits3query']; ?><i class="help-hover glyphicon glyphicon-question-sign"></i></label>
|
||||
<div class="col-sm-8 required-field-block-spin">
|
||||
@@ -248,6 +260,22 @@ $_SESSION[$rspathhex.'csrf_token'] = $newcsrf;
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wits3encryptdesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"><?php echo $lang['wits3encrypt']; ?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php echo $lang['wits3encryptdesc']; ?>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?PHP echo $lang['stnv0002']; ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="wits3querydesc" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
61
worker.php
61
worker.php
@@ -18,7 +18,7 @@ if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
function checkProcess($pid = null) {
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
if(!empty($pid)) {
|
||||
exec("wmic process where \"Name=\"php.exe\" and processid=\"".$pid."\"\" get processid 2>nul", $result);
|
||||
exec("wmic process where \"processid=".$pid."\" get processid 2>nul", $result);
|
||||
if(isset($result[1]) && is_numeric($result[1])) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -27,7 +27,7 @@ function checkProcess($pid = null) {
|
||||
} else {
|
||||
if (file_exists($GLOBALS['pidfile'])) {
|
||||
$pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile']));
|
||||
exec("wmic process where \"Name=\"php.exe\" and processid=\"".$pid."\"\" get processid", $result);
|
||||
exec("wmic process where \"processid=".$pid."\" get processid 2>nul", $result);
|
||||
if(isset($result[1]) && is_numeric($result[1])) {
|
||||
return TRUE;
|
||||
} else {
|
||||
@@ -85,18 +85,19 @@ function start() {
|
||||
echo "\n Error due loading the PHP COM module (wrong server configuration!): ",$e->getMessage(),"\n";
|
||||
}
|
||||
try {
|
||||
$oExec = $WshShell->Run("cmd /C ".$phpcommand." ".__DIR__."\jobs\bot.php", 0, false);
|
||||
$wcmd = "cmd /C ".$phpcommand." ".__DIR__."\jobs\bot.php";
|
||||
$oExec = $WshShell->Run($wcmd, 0, false);
|
||||
} catch (Exception $e) {
|
||||
echo "\n Error due starting Bot (exec command enabled?): ",$e->getMessage(),"\n";
|
||||
}
|
||||
try {
|
||||
exec("wmic process WHERE \"Name=\"php.exe\" AND CommandLine LIKE \"%bot.php%\"\" get ProcessId", $pid);
|
||||
exec("wmic process where \"Name LIKE \"%php%\" AND CommandLine LIKE \"%bot.php%\"\" get ProcessId", $pid);
|
||||
} catch (Exception $e) {
|
||||
echo "\n Error due getting process list (wmic command enabled?): ",$e->getMessage(),"\n";
|
||||
}
|
||||
if(isset($pid[1]) && is_numeric($pid[1])) {
|
||||
exec("echo ".$pid[1]." > ".$GLOBALS['pidfile']);
|
||||
echo " [OK]\n";
|
||||
echo " [OK]";
|
||||
if (file_exists($GLOBALS['autostart'])) {
|
||||
unlink($GLOBALS['autostart']);
|
||||
}
|
||||
@@ -110,7 +111,7 @@ function start() {
|
||||
} else {
|
||||
if (checkProcess() == FALSE) {
|
||||
echo "Starting the Ranksystem Bot.";
|
||||
exec($phpcommand." ".dirname(__FILE__)."/jobs/bot.php >/dev/null 2>&1 & echo $! > ".$GLOBALS['pidfile']);
|
||||
exec($phpcommand." ".__DIR__."/jobs/bot.php >/dev/null 2>&1 & echo $! > ".$GLOBALS['pidfile']);
|
||||
if (checkProcess() == FALSE) {
|
||||
echo " [Failed]\n";
|
||||
} else {
|
||||
@@ -127,45 +128,22 @@ function start() {
|
||||
}
|
||||
|
||||
function stop() {
|
||||
if (checkProcess() == TRUE) {
|
||||
echo "Stopping the Ranksystem Bot.\n";
|
||||
$pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile']));
|
||||
unlink($GLOBALS['pidfile']);
|
||||
echo "Wait until Bot is down";
|
||||
$count_check=0;
|
||||
while (checkProcess($pid) == TRUE) {
|
||||
sleep(1);
|
||||
echo ".";
|
||||
$count_check ++;
|
||||
if($count_check > 10) {
|
||||
if (substr(php_uname(), 0, 7) == "Windows") {
|
||||
if (checkProcess() == TRUE) {
|
||||
echo "Stopping the Ranksystem Bot.\n";
|
||||
$pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile']));
|
||||
exec("del /F ".$GLOBALS['pidfile']);
|
||||
echo "Wait until Bot is down";
|
||||
$count_check=0;
|
||||
while (checkProcess($pid) == TRUE) {
|
||||
sleep(1);
|
||||
echo ".";
|
||||
$count_check ++;
|
||||
if($count_check > 10) {
|
||||
exec("taskkill /F /PID ".$pid);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (checkProcess($pid) == TRUE) {
|
||||
echo " [Failed]\n";
|
||||
} else {
|
||||
echo " [OK]\n";
|
||||
touch($GLOBALS['autostart']);
|
||||
}
|
||||
} else {
|
||||
echo "The Ranksystem seems not running.\n";
|
||||
}
|
||||
$GLOBALS['exec'] = TRUE;
|
||||
} else {
|
||||
if (checkProcess() == TRUE) {
|
||||
echo "Stopping the Ranksystem Bot.\n";
|
||||
$pid = str_replace(array("\r", "\n"), '', file_get_contents($GLOBALS['pidfile']));
|
||||
exec("rm -f ".$GLOBALS['pidfile']);
|
||||
echo "Wait until Bot is down";
|
||||
$count_check=0;
|
||||
while (checkProcess($pid) == TRUE) {
|
||||
sleep(1);
|
||||
echo ".";
|
||||
$count_check ++;
|
||||
if($count_check > 10) {
|
||||
exec("kill -9 ".$pid);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -180,7 +158,6 @@ function stop() {
|
||||
}
|
||||
$GLOBALS['exec'] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
function check() {
|
||||
if (checkProcess() == FALSE) {
|
||||
|
||||
Reference in New Issue
Block a user