diff --git a/.gitignore b/.gitignore index 44938108..37909584 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ # Ignore database configuration files with sensitive credentials modules/billing/includes/config.inc.php +includes/config.inc.php +status/api/config.php +status_api_local.php # Ignore logs modules/billing/logs/*.log diff --git a/includes/config.inc.php.example b/includes/config.inc.php.example new file mode 100644 index 00000000..989f93c9 --- /dev/null +++ b/includes/config.inc.php.example @@ -0,0 +1,15 @@ + diff --git a/modules/config_games/server_configs/dayz_arma2co_win32.xml b/modules/config_games/server_configs/dayz_arma2co_win32.xml index 5a0f4c91..f486a5ab 100644 --- a/modules/config_games/server_configs/dayz_arma2co_win32.xml +++ b/modules/config_games/server_configs/dayz_arma2co_win32.xml @@ -69,13 +69,40 @@ Make sure if you install a MOD, you list the name here or else it wont get loade mkdir -p ./cfg touch ./cfg/dayz_arma2co_win32.xml.txt -wget http://files.iaregamer.com/addons/dayz-mod-1.9.tar.gz . -tar -xzvf dayz-mod-1.9.tar.gz -chmod +x setup_db.sh -./setup_db.sh -rm *.sh -rm *.sql -rm *.gz + +wget http://files.iaregamer.com/gamefiles/arma2Addons.tar +tar -xzvf arma2Addons.tar +rm -f arma2Addons.tar + +wget http://files.iaregamer.com/gamefiles/dayzmod1.9.0.tar +tar -xzvf dayzmod1.9.0.tar +rm -f dayzmod1.9.0.tar + + +#Create Database --------------------------------------- + +dbPass=$( $_REQUEST['use_authorized_hosts'], "allow_setting_cpu_affinity" => $_REQUEST['allow_setting_cpu_affinity'], "regex_invalid_file_name_chars" => addslashes($_REQUEST['regex_invalid_file_name_chars']), - "login_ban_time" => $_REQUEST['login_ban_time'] + "login_ban_time" => $_REQUEST['login_ban_time'], + // Discord Integration + "discord_invite_url" => $_REQUEST['discord_invite_url'], + "discord_webhook_main" => $_REQUEST['discord_webhook_main'], + "discord_webhook_admin" => $_REQUEST['discord_webhook_admin'] ); $db->setSettings($settings); @@ -192,6 +196,11 @@ function exec_ogp_module() // Add regex setting for file manager $ft->add_field('string','regex_invalid_file_name_chars',(@empty($row['regex_invalid_file_name_chars']) ? htmlentities('/[\^\$\*\+\?\(\)\[\{\\\\\\|\]!@#%&=~`,\\\'<>"}\s]/i', ENT_COMPAT | ENT_HTML401 | ENT_QUOTES) : htmlentities(@$row['regex_invalid_file_name_chars'], ENT_COMPAT | ENT_HTML401 | ENT_QUOTES))); + // Discord Integration + $ft->add_field('string','discord_invite_url',@$row['discord_invite_url']); + $ft->add_field('string','discord_webhook_main',@$row['discord_webhook_main']); + $ft->add_field('string','discord_webhook_admin',@$row['discord_webhook_admin']); + // Add option to reset game server order to default $ft->add_field('checkbox','reset_game_server_order','0'); diff --git a/modules/support/support.php b/modules/support/support.php index 3c350ad6..369ced34 100644 --- a/modules/support/support.php +++ b/modules/support/support.php @@ -47,17 +47,16 @@ function exec_ogp_module() { $db->logger( "TICKET SUBMITTED by " . $_SESSION['user_id']); -// URL FROM DISCORD WEBHOOK SETUP -$webhook = "https://discordapp.com/api/webhooks/710275918274363412/g5Tr-EUdEnLfFryOlscxJ6FuPiSJuE6EMKRYmh9UGMiqTUxU5-y9CQrBlDJW7znr0Tol"; -$msg = json_decode(' -{ - "username":"I Are Gamer", - "content":"SUPPORT TICKET CREATED: Login with the userid and password http://privateemail.com" - +// Post to Discord support webhook (configured in Admin > Settings) +$webhook = !empty($settings['discord_webhook_main']) ? $settings['discord_webhook_main'] : ''; +if (!empty($webhook)) { + $panel_name = !empty($settings['panel_name']) ? $settings['panel_name'] : 'GSP'; + $msg = array( + 'username' => $panel_name, + 'content' => 'SUPPORT TICKET: [' . htmlspecialchars($subject, ENT_QUOTES) . '] from ' . htmlspecialchars($_SESSION['users_login'] ?? '', ENT_QUOTES), + ); + discordmsg($msg, $webhook); } -', true); - -discordmsg($msg, $webhook); //end discord $content = get_lang_f('support_email_content', $user['users_login'], $email, $gameserver, $message); @@ -72,7 +71,20 @@ discordmsg($msg, $webhook); '; echo "

".get_lang('support')."

"; + echo ' +
+ +
+
Need help faster?
+
Join our Discord server and post in the support channel for quick assistance from our team and community.
+
+ + Join Discord + +
'; echo '

'.get_lang('please_describe_your_issue_below').'

'; echo get_lang('select_server').":