Procházet zdrojové kódy

Merge remote-tracking branch 'upstream/master'

own3mall před 8 roky
rodič
revize
cba673fa09

+ 1 - 0
lang/English/global.php

@@ -139,4 +139,5 @@ define('OGP_LANG_faq', "F.A.Q.");
 define('OGP_LANG_mysql_admin', "MySQL Admin");
 define('OGP_LANG_copied', "Copied!");
 define('OGP_LANG_ticket_settings', "Ticket Settings");
+define('OGP_LANG_form', "Register");
 ?>

+ 1 - 2
lang/English/modules/register.php

@@ -52,5 +52,4 @@ define('OGP_LANG_user_registration', "User Registration");
 define('OGP_LANG_your_account_details_has_been_sent_by_email_to', "Your account details has been sent by email to <b>%s</b>.");
 define('OGP_LANG_account_created', "Your account has been created.");
 define('OGP_LANG_subject', "%s :: Account Information");
-define('OGP_LANG_form', "Register");
-?>
+?>

+ 2 - 1
modules/config_games/server_configs/arkse_linux64.xml

@@ -143,7 +143,8 @@
         echo "File $maplist not found."
         echo "Generating new maplist file in $maplist!"
         touch $maplist
-        echo Ragnarok> $maplist
+        echo Aberration_P> $maplist
+        echo Ragnarok>> $maplist
         echo ScorchedEarth_P>> $maplist
         echo TheCenter>> $maplist
         echo TheIsland>> $maplist

+ 2 - 1
modules/config_games/server_configs/arkse_win64.xml

@@ -143,7 +143,8 @@
         echo "File $maplist not found."
         echo "Generating new maplist file in $maplist!"
         touch $maplist
-        echo Ragnarok> $maplist
+        echo Aberration_P> $maplist
+        echo Ragnarok>> $maplist
         echo ScorchedEarth_P>> $maplist
         echo TheCenter>> $maplist
         echo TheIsland>> $maplist

+ 50 - 0
modules/config_games/server_configs/arma3_win64.xml

@@ -0,0 +1,50 @@
+<game_config>
+  <game_key>arma3_win64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>arma3</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Arma 3</game_name>
+  <server_exec_name>arma3server_x64.exe</server_exec_name>
+  <cli_template>-config=server.cfg -cfg=basic.cfg -profiles=profile %MEMORY% %PORT% %PLAYERS%</cli_template>
+  <cli_params>
+   <cli_param cli_string="-port=" id="PORT"/>
+   <cli_param cli_string="-maxplayers=" id="PLAYERS"/>
+  </cli_params>
+  <cli_allow_chars>;</cli_allow_chars> <!-- escaped by default: \ " ' | & ; > < ` $ ( ) [ ] -->
+  <console_log>profile/server_console.log</console_log>
+  <max_user_amount>64</max_user_amount>
+  <mods>
+   <mod key='Arma3'>
+    <name>none</name>
+    <installer_name>233780</installer_name>
+   </mod>
+  </mods>
+  <replace_texts>
+   <text key="home_name">
+    <default>(hostname\s*=\s*")(.*)(";)</default>
+    <var>hostname = "%key%";</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+   <text key="max_players">
+    <default>(maxPlayers\s*=\s*)(.*)(;)</default>
+    <var>maxPlayers = %key%;</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+   <text key="control_password">
+    <default>(passwordAdmin\s*=\s*")(.*)(";)</default>
+    <var>passwordAdmin = "%key%";</var>
+    <filepath>server.cfg</filepath>
+    <options>key-regex</options>
+   </text>
+  </replace_texts>
+  <server_params>
+   <param id="MEMORY" key="-maxMem=" type="text">
+    <option>ns</option>
+    <default>1024</default>
+    <caption>Max RAM allocated</caption>
+    <desc>Maximum usable memory in MB, for example: 1024</desc>
+   </param>
+  </server_params>
+</game_config>

+ 22 - 8
modules/config_games/server_configs/dayz_arma2oa_win32.xml

@@ -4,11 +4,16 @@
  <lgsl_query_name>dayzmod</lgsl_query_name>
  <game_name>DayZ Mod (OA)</game_name>
  <server_exec_name>arma2oaserver.exe</server_exec_name>
- <cli_template>-autoInit -noSound -noPause "-mod=@DayZ_Epoch;@DayZ_Epoch_Server;" -name=epoch "-config=epoch\\server.cfg" "-cfg=epoch\\basic.cfg" -profiles=epoch %MEMORY%</cli_template>
+ <cli_template>%MEMORY% %PORT% %PLAYERS% "-config=profile\server.cfg" "-cfg=profile\basic.cfg" -profiles=profile -noSound</cli_template>
+ <cli_params>
+   <cli_param cli_string="-port=" id="PORT"/>
+   <cli_param id="PLAYERS" cli_string="-maxplayers=" />
+ </cli_params>
  <reserve_ports>
     <port type="add" id="QUERY_PORT">1</port>
  </reserve_ports>
- <console_log>epoch/arma2oaserver.RPT</console_log>
+ <cli_allow_chars>;</cli_allow_chars>
+ <console_log>profile/arma2oaserver.RPT</console_log>
  <max_user_amount>64</max_user_amount>
  <control_protocol>rcon2</control_protocol>
  <mods>
@@ -21,37 +26,37 @@
   <text key="home_name">
    <default>(hostName\s*=\s*")(.*)(";)</default>
    <var>hostName = "%key%";</var>
-   <filepath>epoch/server.cfg</filepath>
+   <filepath>profile/server.cfg</filepath>
    <options>key-regex</options>
   </text>
   <text key="max_players">
    <default>(maxPlayers\s*=\s*)(.*)(;)</default>
    <var>maxPlayers = %key%;</var>
-   <filepath>epoch/server.cfg</filepath>
+   <filepath>profile/server.cfg</filepath>
    <options>key-regex</options>
   </text>
   <text key="control_password">
    <default>(passwordAdmin\s*=\s*")(.*)(";)</default>
    <var>passwordAdmin = "%key%";</var>
-   <filepath>epoch/server.cfg</filepath>
+   <filepath>profile/server.cfg</filepath>
    <options>key-regex</options>
   </text>
   <text key="control_password">
    <default>(RConPassword\s*)(.*)</default>
    <var>RConPassword %key%</var>
-   <filepath>epoch/BattlEye/BEServer.cfg</filepath>
+   <filepath>profile/BattlEye/BEServer.cfg</filepath>
    <options>key-regex</options>
   </text>
   <text key="port">
    <default>(steamPort\s*=\s*)(.*)(;)</default>
    <var>steamPort = %key%;</var>
-   <filepath>epoch/server.cfg</filepath>
+   <filepath>profile/server.cfg</filepath>
    <options>key-regex</options>
   </text>
   <text key="query_port">
    <default>(steamQueryPort\s*=\s*)(.*)(;)</default>
    <var>steamQueryPort = %key%;</var>
-   <filepath>epoch/server.cfg</filepath>
+   <filepath>profile/server.cfg</filepath>
    <options>key-regex</options>
   </text>
  </replace_texts>
@@ -62,5 +67,14 @@
    <caption>Max RAM allocated</caption>
    <desc>Maximum usable memory in MB, for example: 1024</desc>
   </param>
+  <param key="-noPause" type="select">
+    <option value="-mod=@DayZ;@Hive;">Vanilla</option>
+    <option value="-mod=@DayZ_Epoch;@DayZ_Epoch_Server;">Epoch</option>
+    <option value="-mod=@DayZOverwatch;@DayZ_Epoch;@DayZ_Epoch_Server;">Overpoch</option>
+    <option value="-mod=@DayZOrigins;@DayZ_Epoch;@DayZ_Epoch_Server;">Origins</option>
+    <option value="-mod=@DayZOverwatch;@DayZOrigins;@DayZ_Epoch;@DayZ_Epoch_Server;">Overpochins</option>
+      <caption>DayZ Flavour</caption>
+      <desc>Type of DayZ server you wish to run</desc>
+    </param>
  </server_params>
 </game_config>

+ 1 - 1
modules/config_games/server_configs/homefront_win32.xml

@@ -33,7 +33,7 @@
   </replace_texts>
   <server_params>
     <param key="-authport=" type="text" id="STEAM_PORT">
-      <default>8770</default>
+      <default>8766</default>
       <options>ns</options>
       <access>admin</access>
       <desc>This is used to authenticate Steam accounts.</desc>

+ 7 - 10
modules/config_games/server_configs/reignofkings_win64.xml

@@ -69,18 +69,9 @@
       <var>rConPort = '%key%'</var>
       <filepath>Configuration/ConsoleSettings.cfg</filepath>
       <options>key-regex</options>
+      <access>admin</access>
       <desc>Sets the port to RCON.</desc>
     </field>
-    <field key="Private" type="select">
-      <option value="False">False</option>
-      <option value="True">True</option>
-      <default>(isPrivate\s*=\s*')(.*)(')</default>
-      <default_value>False</default_value>
-      <var>isPrivate = '%key%'</var>
-      <filepath>Configuration/ServerSettings.cfg</filepath>
-      <options>key-regex</options>
-      <desc>Enables/disables the display in the public server browser.</desc>
-    </field>
     <field key="Level Name" type="select">
       <option value="CrownLand">CrownLand</option>
       <option value="StormWall">StormWall</option>
@@ -92,4 +83,10 @@
       <desc>Defines the map of the server.</desc>
     </field>
   </custom_fields>
+  <configuration_files>
+    <file description="Server Configurations">Configuration/ServerSettings.cfg</file>
+    <file description="Console Configurations">Configuration/ConsoleSettings.cfg</file>
+    <file description="User Configurations">Configuration/Users.cfg</file>
+    <file description="Whitelist Configurations">Configuration/Whitelist.cfg</file>
+  </configuration_files>
 </game_config>

+ 21 - 21
modules/mysql/edit_server.php

@@ -127,7 +127,7 @@ function exec_ogp_module() {
 						if($test_mysql_conn == 0)
 						{
 							$SQL = "CREATE DATABASE IF NOT EXISTS \\`".$mysql_db['db_name']."\\`;".
-								   "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'localhost' IDENTIFIED BY '".$mysql_db['db_passwd']."';".
+								   "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$mysql_db['db_passwd']."';".
 								   "FLUSH PRIVILEGES;";
 							
 							$command = "mysql --host=localhost --port=".$mysql_db['mysql_port']." -uroot -p".$mysql_db['mysql_root_passwd']." -e \"".$SQL."\"";
@@ -148,7 +148,7 @@ function exec_ogp_module() {
 							if ( $link !== FALSE )
 							{
 								$queries = array("CREATE DATABASE IF NOT EXISTS `".$mysql_db['db_name']."`;",
-												 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$mysql_db['db_passwd']."';",
+												 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$mysql_db['db_passwd']."';",
 												 "FLUSH PRIVILEGES;");
 								foreach( $queries as $query )
 								{
@@ -174,7 +174,7 @@ function exec_ogp_module() {
 							if ( $link !== FALSE )
 							{
 								$queries = array("CREATE DATABASE IF NOT EXISTS `".$mysql_db['db_name']."`;",
-												 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$mysql_db['db_passwd']."';",
+												 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$mysql_db['db_passwd']."';",
 												 "FLUSH PRIVILEGES;");
 								foreach( $queries as $query )
 								{
@@ -208,7 +208,7 @@ function exec_ogp_module() {
 			if($host_stat === 1 )
 			{
 				$remote->exec('mysql --host=localhost --port='.$mysql_db['mysql_port'].' -uroot -p'.$mysql_db['mysql_root_passwd'].
-							  ' -e "DROP DATABASE '.$mysql_db['db_name'].";DROP USER '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."';\"");
+							  ' -e "DROP DATABASE '.$mysql_db['db_name'].";DROP USER '".$mysql_db['db_user']."'@'%';\"");
 			}
 		}
 		else
@@ -220,7 +220,7 @@ function exec_ogp_module() {
 				if ( $link !== FALSE )
 				{
 					$queries = array("DROP DATABASE ".$mysql_db['db_name'].";",
-									 "DROP USER '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."';");
+									 "DROP USER '".$mysql_db['db_user']."'@'%';");
 					foreach( $queries as $query )
 					{
 						@$return = mysqli_query($link, $query);
@@ -238,7 +238,7 @@ function exec_ogp_module() {
 				if ( $link !== FALSE )
 				{
 					$queries = array("DROP DATABASE ".$mysql_db['db_name'].";",
-									 "DROP USER '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."';");
+									 "DROP USER '".$mysql_db['db_user']."'@'%';");
 					foreach( $queries as $query )
 					{
 						@$return = mysql_query($query);
@@ -290,8 +290,8 @@ function exec_ogp_module() {
 					$host_stat = $remote->status_chk();
 					if($host_stat === 1 )
 					{
-						$SQL = "DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';".
-							   "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'localhost' IDENTIFIED BY '".$post_db_passwd."';".
+						$SQL = "DROP USER '".$mysql_db['db_user']."'@'%';".
+							   "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';".
 							   "FLUSH PRIVILEGES;";
 							
 						$command = "mysql --host=localhost --port=".$mysql_db['mysql_port']." -uroot -p".$mysql_db['mysql_root_passwd']." -e \"".$SQL."\"";
@@ -306,8 +306,8 @@ function exec_ogp_module() {
 						
 						if ( $link !== FALSE )
 						{
-							$queries = array("DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';",
-											 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$post_db_passwd."';",
+							$queries = array("DROP USER '".$mysql_db['db_user']."'@'%';",
+											 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';",
 											 "FLUSH PRIVILEGES;");
 							foreach( $queries as $query )
 							{
@@ -325,8 +325,8 @@ function exec_ogp_module() {
 						
 						if ( $link !== FALSE )
 						{
-							$queries = array("DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';",
-											 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$post_db_passwd."';",
+							$queries = array("DROP USER '".$mysql_db['db_user']."'@'%';",
+											 "GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';",
 											 "FLUSH PRIVILEGES;");
 							foreach( $queries as $query )
 							{
@@ -351,10 +351,10 @@ function exec_ogp_module() {
 					if($host_stat === 1 )
 					{
 						if($enabled == "0")
-							$SQL = "DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';".
+							$SQL = "DROP USER '".$mysql_db['db_user']."'@'%';".
 								   "FLUSH PRIVILEGES;";
 						else
-							$SQL = "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'localhost' IDENTIFIED BY '".$post_db_passwd."';".
+							$SQL = "GRANT ".$mysql_db['privilegies_str']." ON \\`".$mysql_db['db_name']."\\`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';".
 								   "FLUSH PRIVILEGES;";
 							
 						$command = "mysql --host=localhost --port=".$mysql_db['mysql_port']." -uroot -p".$mysql_db['mysql_root_passwd']." -e \"".$SQL."\"";
@@ -370,10 +370,10 @@ function exec_ogp_module() {
 						if ( $link !== FALSE )
 						{
 							if($enabled == "0")
-								$queries = array("DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';",
+								$queries = array("DROP USER '".$mysql_db['db_user']."'@'%';",
 												 "FLUSH PRIVILEGES;");
 							else
-								$queries = array("GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$post_db_passwd."';",
+								$queries = array("GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';",
 												 "FLUSH PRIVILEGES;");
 												 
 							foreach( $queries as $query )
@@ -393,10 +393,10 @@ function exec_ogp_module() {
 						if ( $link !== FALSE )
 						{
 							if($enabled == "0")
-								$queries = array("DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';",
+								$queries = array("DROP USER '".$mysql_db['db_user']."'@'%';",
 												 "FLUSH PRIVILEGES;");
 							else
-								$queries = array("GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'".$mysql_db['mysql_ip']."' IDENTIFIED BY '".$post_db_passwd."';",
+								$queries = array("GRANT ".$mysql_db['privilegies_str']." ON `".$mysql_db['db_name']."`.* TO '".$mysql_db['db_user']."'@'%' IDENTIFIED BY '".$post_db_passwd."';",
 												 "FLUSH PRIVILEGES;");
 												 
 							foreach( $queries as $query )
@@ -449,7 +449,7 @@ function exec_ogp_module() {
 						if($host_stat === 1 )
 						{
 							$remote->exec('mysql --host=localhost --port='.$mysql_server['mysql_port'].' -uroot -p'.$mysql_server['mysql_root_passwd'].
-										  ' -e "DROP DATABASE '.$mysql_db['db_name'].";DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';\"");
+										  ' -e "DROP DATABASE '.$mysql_db['db_name'].";DROP USER '".$mysql_db['db_user']."'@'%';\"");
 						}
 					}
 					else
@@ -461,7 +461,7 @@ function exec_ogp_module() {
 							if ( $link !== FALSE )
 							{
 								$queries = array("DROP DATABASE ".$mysql_db['db_name'].";",
-												 "DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';");
+												 "DROP USER '".$mysql_db['db_user']."'@'%';");
 								foreach( $queries as $query )
 								{
 									@$return = mysqli_query($query);
@@ -478,7 +478,7 @@ function exec_ogp_module() {
 							if ( $link !== FALSE )
 							{
 								$queries = array("DROP DATABASE ".$mysql_db['db_name'].";",
-												 "DROP USER '".$mysql_db['db_user']."'@'".$mysql_server['mysql_ip']."';");
+												 "DROP USER '".$mysql_db['db_user']."'@'%';");
 								foreach( $queries as $query )
 								{
 									@$return = mysql_query($query);

+ 2 - 3
protocol/TeamSpeak3/Adapter/Update.php

@@ -4,8 +4,6 @@
  * @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
@@ -20,12 +18,13 @@
  * 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.
  */
 
 /**
+ * @deprecated
+ *
  * @class TeamSpeak3_Adapter_Update
  * @brief Provides methods to query the latest TeamSpeak 3 build numbers from the master server.
  */

+ 2 - 5
protocol/TeamSpeak3/Helper/Convert.php

@@ -4,8 +4,6 @@
  * @file
  * TeamSpeak 3 PHP Framework
  *
- * $Id: Convert.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
@@ -20,9 +18,8 @@
  * 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.
+ * @copyright Copyright (c) Planet TeamSpeak. All rights reserved.
  */
 
 /**
@@ -332,7 +329,7 @@ class TeamSpeak3_Helper_Convert
   {
     if(!preg_match('/\A(?:(\xff\xd8\xff)|(GIF8[79]a)|(\x89PNG\x0d\x0a)|(BM)|(\x49\x49(\x2a\x00|\x00\x4a))|(FORM.{4}ILBM))/', $binary, $matches))
     {
-      return "application/octet-stream";
+      return "image/svg+xml";
     }
 
     $type = array(