16 Commits
0.11 ... master

Author SHA1 Message Date
Tekaoh
899618605d Version bump to 0.13 2020-09-19 13:40:16 -04:00
Tekaoh
488a59ff03 Apparently useExternalAuth doesn't actually do anything in src haha 2020-09-19 08:42:42 -04:00
Tekaoh
8060c6caea Add server settings to WordPress admin dashboard
Also add a webcfg listener that replies to requests for the server 
config file
2020-09-18 21:25:27 -04:00
Tekaoh
9c4423a576 Newer WordPress version 2020-09-14 18:49:53 -04:00
Tekaoh
b283c70078 Version bump to 0.12 2020-07-04 16:22:10 -04:00
Tekaoh
4dda69be16 Show a list of characters associated with an account 2020-07-03 22:06:24 -04:00
Tekaoh
693c493fa3 We want to be saving Station IDs for use in later features 2020-07-03 22:01:17 -04:00
Tekaoh
42ceaecde5 Add an admin dashicon 2020-07-03 18:31:44 -04:00
Tekaoh
3ef4f9f348 Apparently JsonWebAPI is picky about headers 2020-07-01 20:59:00 -04:00
Tekaoh
27f4595b62 Optionally displays the highest population on your server
Closes #8
2020-07-01 20:09:06 -04:00
Tekaoh
58b23cd7e1 Forgot a line break 2020-06-28 21:19:48 -04:00
Tekaoh
18035097d1 My bad 2020-06-28 21:18:48 -04:00
Tekaoh
c311c87386 Add JsonWebAPI support to auth check
Closes #3
2020-06-28 21:17:37 -04:00
Tekaoh
aceb97a399 Add JsonWebAPI to server config if that type is selected 2020-06-28 20:58:56 -04:00
Tekaoh
f87613f046 Add a setting to change the auth type 2020-06-28 20:58:13 -04:00
Tekaoh
36e4a2e952 Some formatting for the settings page 2020-06-28 20:26:13 -04:00
19 changed files with 9732 additions and 18 deletions

View File

@@ -0,0 +1,22 @@
@font-face {
font-family: 'swg auth dashicons';
src: url('../fonts/swg-auth-dashicons.eot');
src: url('../fonts/swg-auth-dashicons.eot?#iefix') format('embedded-opentype'),
url('../fonts/swg-auth-dashicons.woff') format('woff'),
url('../fonts/swg-auth-dashicons.ttf') format('truetype'),
url('../fonts/swg-auth-dashicons.svg#swg-auth-dashicons') format('svg');
font-weight: normal;
font-style: normal;
}
[class*='dashicons-swg']:before{
display: inline-block;
font-family: 'swg auth dashicons';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale
}
.dashicons-swg:before{content:'\0041';}

Binary file not shown.

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" ><svg xmlns="http://www.w3.org/2000/svg"><metadata>Generated by Glyphter</metadata><defs><font id="swg-auth-dashicons" horiz-adv-x="0"><font-face units-per-em="1024" ascent="1024" descent="0" font-family="swg-auth-dashicons" font-weight="normal" /><missing-glyph horiz-adv-x="0" /><glyph unicode="&#x0041;" d="M512.884,1024C512.884,1024,494.159,959.636,494.159,959.636C494.159,959.636,470.754,792.397,470.754,792.397C470.754,792.397,480.01,784.763,480.01,784.763C480.274,784.544,480.534,784.311,480.784,784.078C511.532,755.292,541.547,725.654,570.271,694.663C570.271,694.663,532.694,959.996,532.694,959.996C532.694,959.996,512.884,1024,512.884,1024C512.884,1024,512.884,1024,512.884,1024M314.804,722.073C314.804,722.073,327.429,683.263,327.429,683.263C327.429,683.263,372.572,577.061,372.572,577.061C372.572,577.061,136.196,555.395,136.196,555.395C136.196,555.395,72.5,542.345,72.5,542.345C72.5,542.345,136.114,523.723,136.114,523.723C136.114,523.723,377.553,478.433,377.553,478.433C377.553,478.433,311.984,407.671,311.984,407.671C311.984,407.671,278.573,367.058,278.573,367.058C278.573,367.058,323.654,378.844,323.654,378.844C323.654,378.844,440.783,422.689,440.783,422.689C440.783,422.689,492.136,59.866,492.136,59.866C492.136,59.866,512.88,0,512.88,0C512.88,0,532.027,59.866,532.027,59.866C532.027,59.866,580.349,422.436,580.349,422.436C580.349,422.436,682.242,379.477,682.242,379.477C682.242,379.477,710.953,371.111,710.953,371.111C691.057,405.213,669.532,438.395,646.688,470.728C646.688,470.728,642.471,475.811,642.471,475.811C642.471,475.811,643.008,475.914,643.008,475.914C602.303,533.024,557.513,587.478,510.344,639.689C510.344,639.689,499.564,562.7,499.564,562.7C499.564,562.7,402.789,648.634,402.789,648.634C402.789,648.634,368.19,667.934,368.19,667.934C368.19,667.934,314.804,722.073,314.804,722.073M708.259,716.445C708.259,716.445,679.73,700.729,679.73,700.729C679.73,700.729,613.849,645.936,613.849,645.936C613.849,645.936,660.296,730.648,660.296,730.648C660.296,730.648,669.925,761.553,669.925,761.553C669.925,761.553,708.259,716.445,708.259,716.445M677.138,569.523C693.991,547.96,710.419,526.16,726.7,504.395C726.94,504.07,727.166,503.741,727.378,503.403C729.422,500.205,731.503,497.018,733.601,493.835C733.601,493.835,893.474,525.455,893.474,525.455C893.474,525.455,951.806,542.345,951.806,542.345C951.806,542.345,894.011,555.364,894.011,555.364C894.011,555.364,677.138,569.523,677.138,569.523C677.138,569.523,677.138,569.523,677.138,569.523M214.086,700.133C195.429,737.577,184.214,778.348,175.071,818.872C175.584,843.543,173.582,872.217,192.745,890.894C209.505,909.465,237.59,910.663,260.881,906.494C284.409,902.892,305.127,889.09,326.916,880.093C377.159,848.336,422.828,810.054,468.57,772.357C511.477,732.192,552.816,690.483,591.074,645.871C634.652,598.079,673.872,546.542,712.545,494.834C735.98,458.171,762.627,423.357,784.313,385.715C807.845,335.906,836.251,288.251,853.086,235.581C861.716,212.738,865.972,187.998,867.978,163.799C871.24,134.691,857.386,100.418,826.929,92.014C798.191,84.072,768.221,94.04,742.122,106.165C677.754,136.495,623.184,183.062,569.645,228.991C563.634,240.658,567.136,261.249,584.183,257.014C623.359,225.75,664.825,197.008,708.276,172.011C730.383,161.194,756.616,146.272,781.356,155.881C803.069,169.15,797.192,199.048,793.874,220.248C785.607,255.487,771,289.131,755.894,321.929C694.241,442.133,612.097,550.808,521.613,650.951C476.553,699.538,427.624,745.067,374.434,784.766C344.111,803.372,313.986,825.493,278.809,833.352C261.453,837.464,236.005,838.628,230.278,817.239C221.151,784.468,230.521,750.52,240.229,718.896C245.172,707.654,246.949,690.517,232.078,686.454C223.602,685.591,216.259,692.349,214.086,700.133C214.086,700.133,214.086,700.133,214.086,700.133" class="dashicons-swg"/></font></defs></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Binary file not shown.

View File

@@ -24,6 +24,7 @@ $centralserver_key = get_option( 'swg-auth-centralserver-key' );
<code>
[LoginServer]<br>
useExternalAuth=true<br>
<?php echo ( get_option( 'swg-auth-auth-type' ) === 'JsonWebAPI' ) ? "useJsonWebApi=true<br>" : ''; ?>
externalAuthURL=<?php echo get_site_url(); ?>/?action=swg-auth
<?php echo ( $loginserver_key !== '' ) ? '<br>externalAuthSecretKey=' . $loginserver_key : ''; ?>
</code>

View File

@@ -0,0 +1,63 @@
<?php
// No Direct Access
if ( ! defined( 'ABSPATH' ) ) {
die;
}
if ( isset( $_GET['tab'] ) ) {
$tab = $_GET['tab'];
} else {
$tab = 'general';
}
settings_errors();
?>
<div class="wrap">
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
<h2 class="nav-tab-wrapper">
<a href="?page=swg-auth-server-settings&tab=general" class="nav-tab<?php echo $tab === 'general' ? ' nav-tab-active' : '' ?>">General</a>
<a href="?page=swg-auth-server-settings&tab=zones" class="nav-tab<?php echo $tab === 'zones' ? ' nav-tab-active' : '' ?>">Zones</a>
<a href="?page=swg-auth-server-settings&tab=events" class="nav-tab<?php echo $tab === 'events' ? ' nav-tab-active' : '' ?>">Events</a>
<a href="?page=swg-auth-server-settings&tab=advanced" class="nav-tab<?php echo $tab === 'advanced' ? ' nav-tab-active' : '' ?>">Advanced</a>
<a href="?page=swg-auth-server-settings&tab=custom" class="nav-tab<?php echo $tab === 'custom' ? ' nav-tab-active' : '' ?>">Custom</a>
</h2>
<form action="options.php" method="post">
<?php
if ( $tab === 'general' ) {
settings_fields( 'swg-auth-general-server-settings' );
do_settings_sections( 'swg-auth-general-server-settings' );
} elseif ( $tab === 'zones' ) {
settings_fields( 'swg-auth-zones-settings' );
do_settings_sections( 'swg-auth-zones-settings' );
} elseif ( $tab === 'events' ) {
settings_fields( 'swg-auth-events-settings' );
do_settings_sections( 'swg-auth-events-settings' );
} elseif ( $tab === 'advanced' ) {
settings_fields( 'swg-auth-advanced-server-settings' );
do_settings_sections( 'swg-auth-advanced-server-settings' );
} elseif ( $tab === 'custom' ) {
?>
<style>
.form-table th {
width: 0px;
padding: 0;
}
textarea {
width: 100%;
}
</style>
<?php
settings_fields( 'swg-auth-custom-server-settings' );
do_settings_sections( 'swg-auth-custom-server-settings' );
}
submit_button( 'Save Settings' );
?>
</form>
</div>

View File

@@ -9,6 +9,31 @@ if ( ! defined( 'ABSPATH' ) ) {
<h3>SWG Settings</h3>
<?php
// We're going to need OCI8 to look up character names.
if ( extension_loaded( 'OCI8' ) ) {
// Do we have a Station ID on file for this account?
$station_id = get_user_meta( $user->ID, 'swg-auth-station-id', true );
if ( $station_id ) {
// If so, ask Oracle for a list of characters on this account.
$connection = swg_auth_oci_connect();
$statement = oci_parse( $connection, "SELECT * FROM PLAYERS WHERE STATION_ID='" . $station_id . "'" );
$results = oci_execute( $statement );
// Create a list of characters.
$format = get_option( 'date_format' );
echo '<p>Characters associated with this account:</p>';
echo '<ul>';
while ( $result = oci_fetch_array( $statement, OCI_ASSOC + OCI_RETURN_NULLS ) ) {
echo '<li>' . $result['CHARACTER_FULL_NAME'] . ' (Last Login: ' . wp_date( $format, strtotime( $result['LAST_LOGIN_TIME'] ) ) . '; Created: ' . wp_date( $format, strtotime( $result['CREATE_TIME'] ) ) . ')' . '</li>';
}
echo '</ul>';
} else {
// No Station ID in user meta
echo '<p>Station ID unknown. Waiting for next account authentication...</p>';
}
}
?>
<?php
$is_admin = false;
// Collect the user's existing meta values

View File

@@ -15,7 +15,7 @@ function swg_auth_admin_menus() {
'administrator',
'swg-auth-settings',
'swg_auth_settings_html',
'', // TODO: Icon URL
'dashicons-swg',
3
);
@@ -29,6 +29,16 @@ function swg_auth_admin_menus() {
1
);
add_submenu_page(
'swg-auth-settings',
'SWG Server Settings (BETA)',
'Server Settings',
'administrator',
'swg-auth-server-settings',
'swg_auth_server_settings_html',
1
);
add_submenu_page(
'swg-auth-settings',
'Server Config',
@@ -49,9 +59,23 @@ function swg_auth_settings_html() {
include( plugin_dir_path( __FILE__ ) . 'html/swg-auth-settings-html.php' );
}
function swg_auth_server_settings_html() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
include( plugin_dir_path( __FILE__ ) . 'html/swg-auth-server-settings-html.php' );
}
function swg_auth_server_config_html() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
include( plugin_dir_path( __FILE__ ) . 'html/swg-auth-server-config-html.php' );
}
// Include the Admin CSS
add_action( 'admin_enqueue_scripts', 'swg_auth_admin_enqueue_scripts' );
function swg_auth_admin_enqueue_scripts() {
wp_register_style( 'swg_auth_dashicons', plugins_url( '/swg-auth/admin/css/swg-auth-dashicons.css' ) );
wp_enqueue_style( 'swg_auth_dashicons' );
}

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-approval-required',
'Require approval before an account can have game access.',
'Account Approval Required',
'swg_auth_approval_required_html',
'swg-auth-settings',
'swg-auth-general-settings',
@@ -39,6 +39,30 @@ function swg_auth_settings() {
)
);
register_setting(
'swg-auth-settings',
'swg-auth-auth-type',
array(
'type' => 'string',
'description' => 'What type of auth is to be used.',
'sanitize_callback' => '', // TODO: A callback function that sanitizes the option's value.
'show_in_rest' => false,
'default' => 'WebAPI'
)
);
add_settings_field(
'swg-auth-auth-type',
'Auth Type',
'swg_auth_auth_type_html',
'swg-auth-settings',
'swg-auth-general-settings',
array(
//'label_for' => '', // When supplied, the setting title will be wrapped in a <label> element, its for attribute populated with this value.
//'class' => '', // CSS Class to be added to the <tr> element when the field is output.
)
);
add_settings_section(
'swg-auth-odb-settings',
'Oracle Database Connection Settings',
@@ -60,7 +84,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-odb-username',
'Oracle Username:',
'Oracle Username',
'swg_auth_odb_username_html',
'swg-auth-settings',
'swg-auth-odb-settings',
@@ -84,7 +108,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-odb-password',
'Oracle Password:',
'Oracle Password',
'swg_auth_odb_password_html',
'swg-auth-settings',
'swg-auth-odb-settings',
@@ -108,7 +132,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-odb-sid',
'Oracle SID:',
'Oracle SID',
'swg_auth_odb_sid_html',
'swg-auth-settings',
'swg-auth-odb-settings',
@@ -132,7 +156,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-odb-ip',
'Oracle IP Address:',
'Oracle IP Address',
'swg_auth_odb_ip_html',
'swg-auth-settings',
'swg-auth-odb-settings',
@@ -156,7 +180,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-odb-port',
'Oracle Port:',
'Oracle Port',
'swg_auth_odb_port_html',
'swg-auth-settings',
'swg-auth-odb-settings',
@@ -187,7 +211,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-loginserver-key',
'LoginServer Key:',
'LoginServer Key',
'swg_auth_loginserver_key_html',
'swg-auth-settings',
'swg-auth-secret-keys',
@@ -211,7 +235,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-serverutility-key',
'ServerUtility Key:',
'ServerUtility Key',
'swg_auth_serverutility_key_html',
'swg-auth-settings',
'swg-auth-secret-keys',
@@ -235,7 +259,7 @@ function swg_auth_settings() {
add_settings_field(
'swg-auth-centralserver-key',
'CentralServer Key:',
'CentralServer Key',
'swg_auth_centralserver_key_html',
'swg-auth-settings',
'swg-auth-secret-keys',
@@ -253,7 +277,20 @@ function swg_auth_general_settings_html( $args ) {
function swg_auth_approval_required_html( $args ) {
?>
<label for="swg-auth-approval-required">
<input type="checkbox" name="swg-auth-approval-required" <?php echo ( get_option( 'swg-auth-approval-required' ) === 'on' ) ? 'checked' : ''; ?>>
Require new accounts to be manually approved before they can login to the game.
</label>
<?php
}
function swg_auth_auth_type_html( $args ) {
$current_value = get_option( 'swg-auth-auth-type' );
?>
<select name="swg-auth-auth-type">
<option value="WebAPI" <?php echo ( $current_value === 'WebAPI' ) ? 'selected="selected"' : ''; ?>>WebAPI</option>
<option value="JsonWebAPI" <?php echo ( $current_value === 'JsonWebAPI' ) ? 'selected="selected"' : ''; ?>>JsonWebAPI</option>
</select>
<?php
}

View File

@@ -5,17 +5,42 @@ if ( ! defined( 'ABSPATH' ) ) {
die;
}
// Check if the swg-auth action is requested and that a user_name and user_password are provided
if ( isset( $_GET['action'] ) && $_GET['action'] === 'swg-auth' && isset( $_POST['user_name'] ) && isset( $_POST['user_password'] ) ) {
// Check if the swg-auth action is requested
if ( isset( $_GET['action'] ) && $_GET['action'] === 'swg-auth' ) {
// What type of auth are we using?
$auth_type = get_option( 'swg-auth-auth-type', 'WebAPI' );
// Parse for the data we need
if ( $auth_type === 'WebAPI' ) {
$username = $_POST['user_name'];
$password = $_POST['user_password'];
$station_id = $_POST['stationID'];
$ip = $_POST['ip'];
$key = $_POST['secretKey'];
} elseif ( $auth_type === 'JsonWebAPI' ) {
$data = json_decode( file_get_contents( 'php://input' ), true );
$username = $data['user_name'];
$password = $data['user_password'];
$station_id = $data['stationID'];
$ip = $data['ip'];
$key = $data['secretKey'];
}
// Do we have everything we need continue?
if ( ! isset( $username ) || ! isset( $password ) ) {
// If not, abort the auth check and return to WordPress
return;
}
// Check the secret key
if ( $_POST['secretKey'] !== get_option( 'swg-auth-loginserver-key', '' ) ) {
if ( $key !== get_option( 'swg-auth-loginserver-key', '' ) ) {
// If it's incorrect, stop immediately
die;
}
// Ask WordPress to authenticate the user_name and user_password
$user = wp_authenticate_username_password( null, $_POST['user_name'], $_POST['user_password'] );
// Ask WordPress to authenticate the username and userpassword
$user = wp_authenticate_username_password( null, $username, $password );
// Check if the authentication request returned an error
if ( is_wp_error( $user ) ) {
@@ -38,7 +63,11 @@ if ( isset( $_GET['action'] ) && $_GET['action'] === 'swg-auth' && isset( $_POST
$response['message'] = 'success';
}
// Save the account's Station ID for later
update_user_meta( $user->ID, 'swg-auth-station-id', $station_id );
// JSON Encode our response so that the SWG server can understand it
header('Content-type: application/json');
echo json_encode( $response );
// Once we've responded, we don't want WordPress to continue

View File

@@ -20,6 +20,18 @@ if ( isset( $_GET['action'] ) && $_GET['action'] === 'swg-auth-metrics' ) {
// Add our own timestamp so that we know when this data was received
$data['timestamp'] = time();
// Have we set a new record for the highest population?
$old_data = get_option( 'swg-auth-metrics-data' );
if ( ! array_key_exists( 'highestPlayerCount', $old_data ) || $old_data['highestPlayerCount'] < $data['totalPlayerCount'] ) {
// If so, save the data for our new record
$data['highestPlayerCount'] = $data['totalPlayerCount'];
$data['highestPlayerCountTimestamp'] = $data['timestamp'];
} else {
// If not, save the data from our most recent record
$data['highestPlayerCount'] = $old_data['highestPlayerCount'];
$data['highestPlayerCountTimestamp'] = $old_data['highestPlayerCountTimestamp'];
}
// Put the data into the database for later
update_option( 'swg-auth-metrics-data', $data );

View File

@@ -0,0 +1,385 @@
<?php
// No Direct Access
if ( ! defined( 'ABSPATH' ) ) {
die;
}
// Is the webcfg action requested?
if ( isset( $_GET['action'] ) && $_GET['action'] === 'swg-auth-webcfg' ) {
// Begin Outputting CFG
?>
[BestineEvents]
MuseumEventDuration=<?php echo get_option( 'swg-auth-MuseumEventDuration', '1209600' ) . PHP_EOL; ?>
PoliticianEventDuration=<?php echo get_option( 'swg-auth-PoliticianEventDuration', '2592000' ) . PHP_EOL; ?>
[CentralServer]
<?php echo get_option( 'swg-auth-enable-corellia', 'on' ) === 'on' ? 'startPlanet=corellia' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-dantooine', 'on' ) === 'on' ? 'startPlanet=dantooine' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-dathomir', 'on' ) === 'on' ? 'startPlanet=dathomir' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-endor', 'on' ) === 'on' ? 'startPlanet=endor' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-lok', 'on' ) === 'on' ? 'startPlanet=lok' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-dead-forest', 'on' ) === 'on' ? 'startPlanet=kashyyyk_dead_forest' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-hunting', 'on' ) === 'on' ? 'startPlanet=kashyyyk_hunting' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-main', 'on' ) === 'on' ? 'startPlanet=kashyyyk_main' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-north-dungeons', 'on' ) === 'on' ? 'startPlanet=kashyyyk_north_dungeons' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-pob-dungeons', 'on' ) === 'on' ? 'startPlanet=kashyyyk_pob_dungeons' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-rryatt-trail', 'on' ) === 'on' ? 'startPlanet=kashyyyk_rryatt_trail' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-kashyyyk-south-dungeons', 'on' ) === 'on' ? 'startPlanet=kashyyyk_south_dungeons' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-mustafar', 'on' ) === 'on' ? 'startPlanet=mustafar' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-naboo', 'on' ) === 'on' ? 'startPlanet=naboo' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-rori', 'on' ) === 'on' ? 'startPlanet=rori' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-talus', 'on' ) === 'on' ? 'startPlanet=talus' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-tatooine', 'on' ) === 'on' ? 'startPlanet=tatooine' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-yavin4', 'on' ) === 'on' ? 'startPlanet=yavin4' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-corellia', 'on' ) === 'on' ? 'startPlanet=space_corellia' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-dantooine', 'on' ) === 'on' ? 'startPlanet=space_dantooine' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-dathomir', 'on' ) === 'on' ? 'startPlanet=space_dathomir' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-endor', 'on' ) === 'on' ? 'startPlanet=space_endor' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-lok', 'on' ) === 'on' ? 'startPlanet=space_lok' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-kashyyyk', 'on' ) === 'on' ? 'startPlanet=space_kashyyyk' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-naboo', 'on' ) === 'on' ? 'startPlanet=space_naboo' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-nova-orion', 'on' ) === 'on' ? 'startPlanet=space_nova_orion' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-tatooine', 'on' ) === 'on' ? 'startPlanet=space_tatooine' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-yavin4', 'on' ) === 'on' ? 'startPlanet=space_yavin4' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-heavy1', 'on' ) === 'on' ? 'startPlanet=space_heavy1' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-light1', 'on' ) === 'on' ? 'startPlanet=space_light1' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-tutorial', 'on' ) === 'on' ? 'startPlanet=tutorial' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-dungeon1', 'on' ) === 'on' ? 'startPlanet=dungeon1' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-adventure1', 'on' ) === 'on' ? 'startPlanet=adventure1' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-adventure2', 'on' ) === 'on' ? 'startPlanet=adventure2' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-npe-falcon', 'on' ) === 'on' ? 'startPlanet=space_npe_falcon' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-npe-falcon-2', 'on' ) === 'on' ? 'startPlanet=space_npe_falcon_2' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-npe-falcon-3', 'on' ) === 'on' ? 'startPlanet=space_npe_falcon_3' . PHP_EOL : ''; ?>
<?php echo get_option( 'swg-auth-enable-space-ord-mantell', 'on' ) === 'on' ? 'startPlanet=space_ord_mantell' . PHP_EOL : ''; ?>
chatServiceBindInterface=<?php echo get_option( 'swg-auth-chatServiceBindInterface', 'eth0' ) . PHP_EOL; ?>
clusterName=<?php echo get_option( 'swg-auth-cluster-name', 'swg' ) . PHP_EOL; ?>
customerServiceBindInterface=<?php echo get_option( 'swg-auth-customerServiceBindInterface', 'eth0' ) . PHP_EOL; ?>
developmentMode=<?php echo get_option( 'swg-auth-developmentMode', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
metricsDataURL=<?php echo get_site_url(); ?>/?action=swg-auth-metrics
<?php echo ( get_option( 'swg-auth-centralserver-key' ) !== '' ) ? 'metricsSecretKey=' . get_option( 'swg-auth-centralserver-key' ) . PHP_EOL : ''; ?>
newbieTutorialEnabled=<?php echo get_option( 'swg-auth-newbieTutorialEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
webUpdateIntervalSeconds=<?php echo get_option( 'swg-auth-webUpdateIntervalSeconds', '10' ) . PHP_EOL; ?>
[CharacterBuilder]
itvMinUsageLevel=<?php echo get_option( 'swg-auth-itvMinUsageLevel', '0' ) . PHP_EOL; ?>
armorEnabled=<?php echo get_option( 'swg-auth-armorEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
BestResourcesEnabled=<?php echo get_option( 'swg-auth-BestResourcesEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
buffsEnabled=<?php echo get_option( 'swg-auth-buffsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
builderEnabled=<?php echo get_option( 'swg-auth-builderEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
commandsEnabled=<?php echo get_option( 'swg-auth-commandsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
craftingEnabled=<?php echo get_option( 'swg-auth-craftingEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
creditsEnabled=<?php echo get_option( 'swg-auth-creditsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
deedsEnabled=<?php echo get_option( 'swg-auth-deedsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
devEnabled=<?php echo get_option( 'swg-auth-devEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
DraftSchematicsEnabled=<?php echo get_option( 'swg-auth-DraftSchematicsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
factionEnabled=<?php echo get_option( 'swg-auth-factionEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
HeroicFlagEnabled=<?php echo get_option( 'swg-auth-HeroicFlagEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
jediEnabled=<?php echo get_option( 'swg-auth-jediEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
miscitemEnabled=<?php echo get_option( 'swg-auth-miscitemEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
pahallEnabled=<?php echo get_option( 'swg-auth-pahallEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
petsEnabled=<?php echo get_option( 'swg-auth-petsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
questEnabled=<?php echo get_option( 'swg-auth-questEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
resourcesEnabled=<?php echo get_option( 'swg-auth-resourcesEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
shipsEnabled=<?php echo get_option( 'swg-auth-shipsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
skillsEnabled=<?php echo get_option( 'swg-auth-skillsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
vehiclesEnabled=<?php echo get_option( 'swg-auth-vehiclesEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
warpsEnabled=<?php echo get_option( 'swg-auth-warpsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
weaponsEnabled=<?php echo get_option( 'swg-auth-weaponsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[ChatServer]
centralServerAddress=<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ) . PHP_EOL; ?>
clusterName=<?php echo get_option( 'swg-auth-cluster-name', 'swg' ) . PHP_EOL; ?>
gatewayServerIP=<?php echo get_option( 'swg-auth-gatewayServerIP', '127.0.0.1' ) . PHP_EOL; ?>
gatewayServerPort=<?php echo get_option( 'swg-auth-gatewayServerPort', '5001' ) . PHP_EOL; ?>
registrarHost=<?php echo get_option( 'swg-auth-registrarHost', '127.0.0.1' ) . PHP_EOL; ?>
registrarPort=<?php echo get_option( 'swg-auth-registrarPort', '5000' ) . PHP_EOL; ?>
[CommodityServer]
minutesActiveToUnaccessed=<?php echo get_option( 'swg-auth-minutesActiveToUnaccessed', '43200' ) . PHP_EOL; ?>
minutesUnaccessedToEndangered=<?php echo get_option( 'swg-auth-minutesUnaccessedToEndangered', '7200' ) . PHP_EOL; ?>
minutesEmptyToEndangered=<?php echo get_option( 'swg-auth-minutesEmptyToEndangered', '21600' ) . PHP_EOL; ?>
minutesEndangeredToRemoved=<?php echo get_option( 'swg-auth-minutesEndangeredToRemoved', '21600' ) . PHP_EOL; ?>
minutesVendorAuctionTimer=<?php echo get_option( 'swg-auth-minutesVendorAuctionTimer', '43200' ) . PHP_EOL; ?>
minutesVendorItemTimer=<?php echo get_option( 'swg-auth-minutesVendorItemTimer', '43200' ) . PHP_EOL; ?>
[ConnectionServer]
chatServiceBindInterface=<?php echo get_option( 'swg-auth-chatServiceBindInterface', 'eth0' ) . PHP_EOL; ?>
clientOverflowLimit=<?php echo get_option( 'swg-auth-clientOverflowLimit', '5242880' ) . PHP_EOL; ?>
customerServiceBindInterface=<?php echo get_option( 'swg-auth-customerServiceBindInterface', 'eth0' ) . PHP_EOL; ?>
disableWorldSnapshot=<?php echo get_option( 'swg-auth-disableWorldSnapshot', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
pingPort=<?php echo get_option( 'swg-auth-pingPort', '44462' ) . PHP_EOL; ?>
validateClientVersion=<?php echo get_option( 'swg-auth-validateClientVersion', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
validateStationKey=<?php echo get_option( 'swg-auth-validateStationKey', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[Custom]
dailyMissionXpLimit=<?php echo get_option( 'swg-auth-dailyMissionXpLimit', '10' ) . PHP_EOL; ?>
grantElderBuff=<?php echo get_option( 'swg-auth-grantElderBuff', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
reverseEngineeringBonusMultiplier=<?php echo get_option( 'swg-auth-reverseEngineeringBonusMultipliert', '1.0' ) . PHP_EOL; ?>
[dbProcess]
centralServerAddress=<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ) . PHP_EOL; ?>
databaseProtocol=<?php echo get_option( 'swg-auth-databaseProtocol', 'OCI' ) . PHP_EOL; ?>
databasePWD=<?php echo get_option( 'swg-auth-odb-password', 'swg' ) . PHP_EOL; ?>
databaseUID=<?php echo get_option( 'swg-auth-odb-username', 'swg' ) . PHP_EOL; ?>
DSN=<?php echo get_option( 'swg-auth-DSN', '//127.0.0.1/swg' ) . PHP_EOL; ?>
loaderThreads=<?php echo get_option( 'swg-auth-loaderThreads', '1' ) . PHP_EOL; ?>
persisterThreads=<?php echo get_option( 'swg-auth-persisterThreads', '1' ) . PHP_EOL; ?>
sharedLoginMode=<?php echo get_option( 'swg-auth-sharedLoginMode', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
useTemplates=<?php echo get_option( 'swg-auth-useTemplates', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[Dungeon]
Corellian_Corvette_Imperial=<?php echo get_option( 'swg-auth-Corellian_Corvette_Imperial', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
Corellian_Corvette_Neutral=<?php echo get_option( 'swg-auth-Corellian_Corvette_Neutral', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
Corellian_Corvette_Rebel=<?php echo get_option( 'swg-auth-Corellian_Corvette_Rebel', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
Death_Watch=<?php echo get_option( 'swg-auth-Death_Watch', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
Geonosian=<?php echo get_option( 'swg-auth-Geonosian', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
serverSwitch=<?php echo get_option( 'swg-auth-serverSwitch', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[EventTeam]
anniversary=<?php echo get_option( 'swg-auth-anniversary', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
forceFoolsDay=<?php echo get_option( 'swg-auth-forceFoolsDay', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
gcwraid=<?php echo get_option( 'swg-auth-gcwraid', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
goldenTicket=<?php echo get_option( 'swg-auth-goldenTicket', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
goldenTicketDropChance=<?php echo get_option( 'swg-auth-goldenTicketDropChance', '2' ) . PHP_EOL; ?>
goldenTicketsAvailable=<?php echo get_option( 'swg-auth-goldenTicketsAvailable', '10' ) . PHP_EOL; ?>
restussEvent=<?php echo get_option( 'swg-auth-restussEvent', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
restussPhase=<?php echo get_option( 'swg-auth-restussPhase', '2' ) . PHP_EOL; ?>
restussProgressionOn=<?php echo get_option( 'swg-auth-restussProgressionOn', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[GameServer]
chroniclesXpModifier=<?php echo get_option( 'swg-auth-chroniclesXpModifier', '1.0' ) . PHP_EOL; ?>
gcwPointBonus=<?php echo get_option( 'swg-auth-gcwPointBonus', '5.0' ) . PHP_EOL; ?>
gcwTokenBonus=<?php echo get_option( 'swg-auth-gcwTokenBonus', '5.0' ) . PHP_EOL; ?>
harvesterExtractionRateMultiplier=<?php echo get_option( 'swg-auth-harvesterExtractionRateMultiplier', '5.0' ) . PHP_EOL; ?>
xpMultiplier=<?php echo get_option( 'swg-auth-xpMultiplier', '3' ) . PHP_EOL; ?>
empireday_ceremony=<?php echo get_option( 'swg-auth-empireday_ceremony', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
foolsDay=<?php echo get_option( 'swg-auth-foolsDay', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
halloween=<?php echo get_option( 'swg-auth-halloween', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
lifeday=<?php echo get_option( 'swg-auth-lifeday', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
loveday=<?php echo get_option( 'swg-auth-loveday', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
adminGodToAll=<?php echo get_option( 'swg-auth-adminGodToAll', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
adminGodToAllGodLevel=<?php echo get_option( 'swg-auth-adminGodToAllGodLevel', '50' ) . PHP_EOL; ?>
aiLoggingEnabled=<?php echo get_option( 'swg-auth-aiLoggingEnabled', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
allowMasterObjectCreation=<?php echo get_option( 'swg-auth-allowMasterObjectCreation', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
allowPlayersToPackVendors=<?php echo get_option( 'swg-auth-allowPlayersToPackVendors', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
centralServerAddress=<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ) . PHP_EOL; ?>
chroniclesChroniclerGoldTokenChanceOverride=<?php echo get_option( 'swg-auth-chroniclesChroniclerGoldTokenChanceOverride', '15' ) . PHP_EOL; ?>
chroniclesChroniclerSilverTokenNumModifier=<?php echo get_option( 'swg-auth-chroniclesChroniclerSilverTokenNumModifier', '2' ) . PHP_EOL; ?>
chroniclesQuestorGoldTokenChanceOverride=<?php echo get_option( 'swg-auth-chroniclesQuestorGoldTokenChanceOverride', '15' ) . PHP_EOL; ?>
chroniclesQuestorSilverTokenNumModifier=<?php echo get_option( 'swg-auth-chroniclesQuestorSilverTokenNumModifier', '2' ) . PHP_EOL; ?>
combatUpgradeReward=<?php echo get_option( 'swg-auth-combatUpgradeReward', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
commoditiesMarketEnabled=<?php echo get_option( 'swg-auth-commoditiesMarketEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
createAppearances=<?php echo get_option( 'swg-auth-createAppearances', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
createZoneObjects=<?php echo get_option( 'swg-auth-createZoneObjects', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
debugMode=<?php echo get_option( 'swg-auth-debugMode', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
deleteEventProps=<?php echo get_option( 'swg-auth-deleteEventProps', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
disableResources=<?php echo get_option( 'swg-auth-disableResources', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
drainRate=<?php echo get_option( 'swg-auth-drainRate', '0.00065' ) . PHP_EOL; ?>
enableCovertImperialMercenary=<?php echo get_option( 'swg-auth-enableCovertImperialMercenary', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
enableCovertRebelMercenary=<?php echo get_option( 'swg-auth-enableCovertRebelMercenary', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
enableOvertImperialMercenary=<?php echo get_option( 'swg-auth-enableOvertImperialMercenary', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
enableOvertRebelMercenary=<?php echo get_option( 'swg-auth-enableOvertRebelMercenary', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
enablePreload=<?php echo get_option( 'swg-auth-enablePreload', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
fatalOnGoldPobChange=<?php echo get_option( 'swg-auth-fatalOnGoldPobChange', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
flashSpeederReward=<?php echo get_option( 'swg-auth-flashSpeederReward', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
gcwcitybestine=<?php echo get_option( 'swg-auth-gcwcitybestine', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
gcwcitydearic=<?php echo get_option( 'swg-auth-gcwcitydearic', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
gcwcitykeren=<?php echo get_option( 'swg-auth-gcwcitykeren', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
gcwInvasionCityMaximumRunning=<?php echo get_option( 'swg-auth-gcwInvasionCityMaximumRunning', '1' ) . PHP_EOL; ?>
gcwInvasionCycleTime=<?php echo get_option( 'swg-auth-gcwInvasionCycleTime', '1' ) . PHP_EOL; ?>
grantGift=<?php echo get_option( 'swg-auth-grantGift', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
hibernateDistance=<?php echo get_option( 'swg-auth-hibernateDistance', '65.0' ) . PHP_EOL; ?>
hibernateEnabled=<?php echo get_option( 'swg-auth-hibernateEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
hibernateProxies=<?php echo get_option( 'swg-auth-hibernateProxies', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
idleLogoutTimeSec=<?php echo get_option( 'swg-auth-idleLogoutTimeSec', '300' ) . PHP_EOL; ?>
javaConsoleDebugMessages=<?php echo get_option( 'swg-auth-javaConsoleDebugMessages', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
javaEngineProfiling=<?php echo get_option( 'swg-auth-javaEngineProfiling', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
javaLocalRefLimit=<?php echo get_option( 'swg-auth-javaLocalRefLimit', '16' ) . PHP_EOL; ?>
javaVMName=<?php echo get_option( 'swg-auth-javaVMName', 'sun' ) . PHP_EOL; ?>
maxGoldNetworkId=<?php echo get_option( 'swg-auth-maxGoldNetworkId', '10000000' ) . PHP_EOL; ?>
maxItemAttribBonus=<?php echo get_option( 'swg-auth-maxItemAttribBonus', '250' ) . PHP_EOL; ?>
maxObjectSkillModBonus=<?php echo get_option( 'swg-auth-maxObjectSkillModBonus', '999' ) . PHP_EOL; ?>
maxRespecCount=<?php echo get_option( 'swg-auth-maxRespecCount', '0' ) . PHP_EOL; ?>
maxSocketSkillModBonus=<?php echo get_option( 'swg-auth-maxSocketSkillModBonus', '999' ) . PHP_EOL; ?>
minRespecIntervalInSeconds=<?php echo get_option( 'swg-auth-minRespecIntervalInSeconds', '43200' ) . PHP_EOL; ?>
mountsEnabled=<?php echo get_option( 'swg-auth-mountsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
nameValidationAcceptAll=<?php echo get_option( 'swg-auth-nameValidationAcceptAll', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
regenActionScale=<?php echo get_option( 'swg-auth-regenActionScale', '1.75' ) . PHP_EOL; ?>
regenBase=<?php echo get_option( 'swg-auth-regenBase', '0.999' ) . PHP_EOL; ?>
regenConstant=<?php echo get_option( 'swg-auth-regenConstant', '0' ) . PHP_EOL; ?>
regenerationRate=<?php echo get_option( 'swg-auth-regenerationRate', '0.0064' ) . PHP_EOL; ?>
regenHealthScale=<?php echo get_option( 'swg-auth-regenHealthScale', '6' ) . PHP_EOL; ?>
regenMindScale=<?php echo get_option( 'swg-auth-regenMindScale', '0.5' ) . PHP_EOL; ?>
regenScale=<?php echo get_option( 'swg-auth-regenScale', '2.5' ) . PHP_EOL; ?>
reservedObjectIds=<?php echo get_option( 'swg-auth-reservedObjectIds', '1000000' ) . PHP_EOL; ?>
respecDurationAllowedInSeconds=<?php echo get_option( 'swg-auth-respecDurationAllowedInSeconds', '2419200' ) . PHP_EOL; ?>
rlsDropChance=<?php echo get_option( 'swg-auth-rlsDropChance', '0.5' ) . PHP_EOL; ?>
rlsEnabled=<?php echo get_option( 'swg-auth-rlsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
rlsExceptionalDropChance=<?php echo get_option( 'swg-auth-rlsExceptionalDropChance', '25' ) . PHP_EOL; ?>
rlsLegendaryDropChance=<?php echo get_option( 'swg-auth-rlsLegendaryDropChance', '5' ) . PHP_EOL; ?>
rlsMaxLevelsAbovePlayerLevel=<?php echo get_option( 'swg-auth-rlsMaxLevelsAbovePlayerLevel', '6' ) . PHP_EOL; ?>
rlsMaxLevelsBelowPlayerLevel=<?php echo get_option( 'swg-auth-rlsMaxLevelsBelowPlayerLevel', '6' ) . PHP_EOL; ?>
rlsMinDistanceFromLastLoot=<?php echo get_option( 'swg-auth-rlsMinDistanceFromLastLoot', '5' ) . PHP_EOL; ?>
rlsMinTimeBetweenAwards=<?php echo get_option( 'swg-auth-rlsMinTimeBetweenAwards', '900' ) . PHP_EOL; ?>
rlsRareDropChance=<?php echo get_option( 'swg-auth-rlsRareDropChance', '70' ) . PHP_EOL; ?>
scriptPath=<?php echo get_option( 'swg-auth-scriptPath', '../../data/sku.0/sys.server/compiled/game/' ) . PHP_EOL; ?>
scriptWatcherInterruptTime=<?php echo get_option( 'swg-auth-scriptWatcherInterruptTime', '0' ) . PHP_EOL; ?>
scriptWatcherWarnTime=<?php echo get_option( 'swg-auth-scriptWatcherWarnTime', '5000' ) . PHP_EOL; ?>
sendBreadcrumbs=<?php echo get_option( 'swg-auth-sendBreadcrumbs', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
sendPlayerTransform=<?php echo get_option( 'swg-auth-sendPlayerTransform', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
serverLoadLevel=<?php echo get_option( 'swg-auth-serverLoadLevel', 'heavy' ) . PHP_EOL; ?>
serverSpawnLimit=<?php echo get_option( 'swg-auth-serverSpawnLimit', '60000' ) . PHP_EOL; ?>
spaceGcwCorelliaActive=<?php echo get_option( 'swg-auth-spaceGcwCorelliaActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spaceGcwCorelliaDelay=<?php echo get_option( 'swg-auth-spaceGcwCorelliaDelay', '3' ) . PHP_EOL; ?>
spaceGcwCorelliaStagger=<?php echo get_option( 'swg-auth-spaceGcwCorelliaStagger', '2' ) . PHP_EOL; ?>
spaceGcwDantooineActive=<?php echo get_option( 'swg-auth-spaceGcwDantooineActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spaceGcwDantooineDelay=<?php echo get_option( 'swg-auth-spaceGcwDantooineDelay', '3' ) . PHP_EOL; ?>
spaceGcwDantooineStagger=<?php echo get_option( 'swg-auth-spaceGcwDantooineStagger', '0' ) . PHP_EOL; ?>
spaceGcwGunshipPlayerCeiling=<?php echo get_option( 'swg-auth-spaceGcwGunshipPlayerCeiling', '10' ) . PHP_EOL; ?>
spaceGcwLengthOfBattle=<?php echo get_option( 'swg-auth-spaceGcwLengthOfBattle', '3600.0' ) . PHP_EOL; ?>
spaceGcwLokActive=<?php echo get_option( 'swg-auth-spaceGcwLokActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spaceGcwLokDelay=<?php echo get_option( 'swg-auth-spaceGcwLokDelay', '3' ) . PHP_EOL; ?>
spaceGcwLokStagger=<?php echo get_option( 'swg-auth-spaceGcwLokStagger', '2' ) . PHP_EOL; ?>
spaceGcwLossPointModifier=<?php echo get_option( 'swg-auth-spaceGcwLossPointModifier', '1.0' ) . PHP_EOL; ?>
spaceGcwLossTokenModifier=<?php echo get_option( 'swg-auth-spaceGcwLossTokenModifier', '1.0' ) . PHP_EOL; ?>
spaceGcwMaxSupportShips=<?php echo get_option( 'swg-auth-spaceGcwMaxSupportShips', '30' ) . PHP_EOL; ?>
spaceGcwNabooActive=<?php echo get_option( 'swg-auth-spaceGcwNabooActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spaceGcwNabooDelay=<?php echo get_option( 'swg-auth-spaceGcwNabooDelay', '3' ) . PHP_EOL; ?>
spaceGcwNabooStagger=<?php echo get_option( 'swg-auth-spaceGcwNabooStagger', '4' ) . PHP_EOL; ?>
spaceGcwPobPlayerCeiling=<?php echo get_option( 'swg-auth-spaceGcwPobPlayerCeiling', '4' ) . PHP_EOL; ?>
spaceGcwPointAward=<?php echo get_option( 'swg-auth-spaceGcwPointAward', '2500' ) . PHP_EOL; ?>
spaceGcwPrepatoryTime=<?php echo get_option( 'swg-auth-spaceGcwPrepatoryTime', '900.0' ) . PHP_EOL; ?>
spaceGcwPvEPointModifier=<?php echo get_option( 'swg-auth-spaceGcwPvEPointModifier', '1.0' ) . PHP_EOL; ?>
spaceGcwPvETokenModifier=<?php echo get_option( 'swg-auth-spaceGcwPvETokenModifier', '1.0' ) . PHP_EOL; ?>
spaceGcwPvPPointModifier=<?php echo get_option( 'swg-auth-spaceGcwPvPPointModifier', '2.0' ) . PHP_EOL; ?>
spaceGcwPvPTokenModifier=<?php echo get_option( 'swg-auth-spaceGcwPvPTokenModifier', '2.0' ) . PHP_EOL; ?>
spaceGcwTatooineActive=<?php echo get_option( 'swg-auth-spaceGcwTatooineActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spaceGcwTatooineDelay=<?php echo get_option( 'swg-auth-spaceGcwTatooineDelay', '3' ) . PHP_EOL; ?>
spaceGcwTatooineStagger=<?php echo get_option( 'swg-auth-spaceGcwTatooineStagger', '0' ) . PHP_EOL; ?>
spaceGcwTokenAward=<?php echo get_option( 'swg-auth-spaceGcwTokenAward', '25' ) . PHP_EOL; ?>
spaceGcwTotalSupportSpawn=<?php echo get_option( 'swg-auth-spaceGcwTotalSupportSpawn', '60' ) . PHP_EOL; ?>
spaceGcwWinPointModifier=<?php echo get_option( 'swg-auth-spaceGcwWinPointModifier', '2.0' ) . PHP_EOL; ?>
spaceGcwWinTokenModifier=<?php echo get_option( 'swg-auth-spaceGcwWinTokenModifier', '2.0' ) . PHP_EOL; ?>
spawnAllResources=<?php echo get_option( 'swg-auth-spawnAllResourcess', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
startX=<?php echo get_option( 'swg-auth-startX', '3585.0' ) . PHP_EOL; ?>
startY=<?php echo get_option( 'swg-auth-startY', '10.0' ) . PHP_EOL; ?>
startZ=<?php echo get_option( 'swg-auth-startZ', '2578.0' ) . PHP_EOL; ?>
suiListLimit=<?php echo get_option( 'swg-auth-suiListLimit', '50' ) . PHP_EOL; ?>
useTemplates=<?php echo get_option( 'swg-auth-useTemplates', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
veteranDebugEnableOverrideAccountAge=<?php echo get_option( 'swg-auth-veteranDebugEnableOverrideAccountAge', '9999' ) . PHP_EOL; ?>
veteranDebugTriggerAll=<?php echo get_option( 'swg-auth-veteranDebugTriggerAll', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[LoginPing]
passthroughMode=<?php echo get_option( 'swg-auth-passthroughMode', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[LoginServer]
databasePWD=<?php echo get_option( 'swg-auth-odb-password', 'swg' ) . PHP_EOL; ?>
databaseUID=<?php echo get_option( 'swg-auth-odb-username', 'swg' ) . PHP_EOL; ?>
developmentMode=<?php echo get_option( 'swg-auth-developmentMode', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
DSN=<?php echo get_option( 'swg-auth-DSN', '//127.0.0.1/swg' ) . PHP_EOL; ?>
easyExternalAccess=<?php echo get_option( 'swg-auth-easyExternalAccess', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
<?php echo ( get_option( 'swg-auth-loginserver-key' ) !== '' ) ? 'externalAuthSecretKey=' . get_option( 'swg-auth-loginserver-key' ) . PHP_EOL : ''; ?>
<?php echo ( get_option( 'swg-auth-useExternalAuth', 'on' ) === 'on' ) ? 'externalAuthURL=' . get_site_url() . '/?action=swg-auth' . PHP_EOL : ''; ?>
<?php echo ( get_option( 'swg-auth-auth-type' ) === 'JsonWebAPI' ) ? "useJsonWebApi=true" . PHP_EOL : ''; ?>
validateClientVersion=<?php echo get_option( 'swg-auth-validateClientVersion', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
validateStationKey=<?php echo get_option( 'swg-auth-validateStationKey', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[PlanetServer]
loadWholePlanet=<?php echo get_option( 'swg-auth-loadWholePlanet', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
numTutorialServers=<?php echo get_option( 'swg-auth-numTutorialServers', '1' ) . PHP_EOL; ?>
[Quest]
CommunityCraftingLimit=<?php echo get_option( 'swg-auth-CommunityCraftingLimit', '200' ) . PHP_EOL; ?>
CraftingContract=<?php echo get_option( 'swg-auth-CraftingContract', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
CrowdPleaser=<?php echo get_option( 'swg-auth-CrowdPleaser', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[ScriptFlags]
liveSpaceServer=<?php echo get_option( 'swg-auth-liveSpaceServer', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
npeSequencersActive=<?php echo get_option( 'swg-auth-npeSequencersActive', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
spawnersOn=<?php echo get_option( 'swg-auth-spawnersOn', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
[ServerMetrics]
metricsServerPort=<?php echo get_option( 'swg-auth-metricsServerPort', '0' ) . PHP_EOL; ?>
[ServerUtility]
externalAdminLevelsEnabled=<?php echo get_option( 'swg-auth-externalAdminLevelsEnabled', 'on' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
<?php echo ( get_option( 'swg-auth-serverutility-key' ) !== '' ) ? 'externalAdminLevelsSecretKey=' . get_option( 'swg-auth-serverutility-key' ) . PHP_EOL : ''; ?>
externalAdminLevelsURL=<?php echo get_site_url(); ?>/?action=swg-auth-admin-level
[SharedFile]
searchPath0=<?php echo get_option( 'swg-auth-searchPath0', '../../data/sku.0/sys.client/compiled/clientdata/' ) . PHP_EOL; ?>
searchPath1=<?php echo get_option( 'swg-auth-searchPath1a', '../../data/sku.0/sys.server/built/game/' ) . PHP_EOL; ?>
searchPath1=<?php echo get_option( 'swg-auth-searchPath1b', '../../data/sku.0/sys.shared/built/game/' ) . PHP_EOL; ?>
searchPath2=<?php echo get_option( 'swg-auth-searchPath2a', '../../data/sku.0/sys.server/compiled/game/' ) . PHP_EOL; ?>
searchPath2=<?php echo get_option( 'swg-auth-searchPath2b', '../../data/sku.0/sys.shared/compiled/game/' ) . PHP_EOL; ?>
[SharedFoundation]
debugReportLongFrames=<?php echo get_option( 'swg-auth-debugReportLongFrames', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
fatalCallStackDepth=<?php echo get_option( 'swg-auth-fatalCallStackDepth', '10' ) . PHP_EOL; ?>
frameRateLimit=<?php echo get_option( 'swg-auth-frameRateLimit', '10' ) . PHP_EOL; ?>
warningCallStackDepth=<?php echo get_option( 'swg-auth-warningCallStackDepth', '-1' ) . PHP_EOL; ?>
[SharedLog]
#logTarget=file:logs/balance.log{c-!GameBalance}
#logTarget=file:logs/commodities.txt{c-!CommoditiesServer}
#logTarget=file:logs/cts.txt{d-!CharacterTransfer:p+TransferServer:d+TransferServer:c+CharacterTransfer}
#logTarget=file:logs/customerService.log{c-!CustomerService}
#logTarget=file:logs/log.txt{c-profile:c-CustomerService:c-stderr}
#logTarget=file:logs/population.log{c-!PopulationLog}
#logTarget=file:logs/profile.txt{c-!profile}
#logTarget=file:logs/serverclock.log{c-!ServerClock}
#logTarget=file:logs/startupLog.log{c-*:c+ServerStartup:c+Preload}
#logTarget=file:logs/stderr.txt{c-!stderr}
#logTarget=file:logs/taskProcessDied.txt{c-!TaskProcessDied}
#logTarget=net:<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ); ?>:44467
[SharedNetwork]
byteCountWarnThreshold=<?php echo get_option( 'swg-auth-byteCountWarnThreshold', '1000000' ) . PHP_EOL; ?>
congestionWindowMinimum=<?php echo get_option( 'swg-auth-congestionWindowMinimum', '0' ) . PHP_EOL; ?>
enableFlushAndConfirmAllData=<?php echo get_option( 'swg-auth-enableFlushAndConfirmAllData', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
fragmentSize=<?php echo get_option( 'swg-auth-fragmentSize', '500' ) . PHP_EOL; ?>
incomingBufferSize=<?php echo get_option( 'swg-auth-incomingBufferSize', '4194304' ) . PHP_EOL; ?>
logBackloggedPacketThreshold=<?php echo get_option( 'swg-auth-logBackloggedPacketThreshold', '0' ) . PHP_EOL; ?>
maxOutstandingBytes=<?php echo get_option( 'swg-auth-maxOutstandingBytes', '4194304' ) . PHP_EOL; ?>
maxOutstandingPackets=<?php echo get_option( 'swg-auth-maxOutstandingPackets', '400' ) . PHP_EOL; ?>
maxRawPacketSize=<?php echo get_option( 'swg-auth-maxRawPacketSize', '500' ) . PHP_EOL; ?>
noDataTimeout=<?php echo get_option( 'swg-auth-noDataTimeout', '1000000' ) . PHP_EOL; ?>
oldestUnacknowledgedTimeout=<?php echo get_option( 'swg-auth-oldestUnacknowledgedTimeout', '0' ) . PHP_EOL; ?>
outgoingBufferSize=<?php echo get_option( 'swg-auth-outgoingBufferSize', '4194304' ) . PHP_EOL; ?>
overflowLimit=<?php echo get_option( 'swg-auth-overflowLimit', '0' ) . PHP_EOL; ?>
packetHistoryMax=<?php echo get_option( 'swg-auth-packetHistoryMax', '512' ) . PHP_EOL; ?>
pooledPacketMax=<?php echo get_option( 'swg-auth-pooledPacketMax', '32000' ) . PHP_EOL; ?>
pooledPacketSize=<?php echo get_option( 'swg-auth-pooledPacketSize', '256' ) . PHP_EOL; ?>
reportMessages=<?php echo get_option( 'swg-auth-reportMessages', '' ) === 'on' ? 'true' : 'false'; echo PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPorta', '44451' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortb', '44452' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortc', '44455' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortd', '44459' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPorte', '44463' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortf', '44464' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortg', '44467' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPorth', '44480' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPorti', '50001' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortj', '60000' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortk', '60001' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortl', '60002' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortm', '61000' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortn', '61222' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPorto', '61232' ) . PHP_EOL; ?>
reservedPort=<?php echo get_option( 'swg-auth-reservedPortp', '61242' ) . PHP_EOL; ?>
[TaskManager]
clusterName=<?php echo get_option( 'swg-auth-cluster-name', 'swg' ) . PHP_EOL; ?>
loginServerAddress=<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ) . PHP_EOL; ?>
node0=<?php echo get_option( 'swg-auth-server-ip', '192.168.0.0' ) . PHP_EOL; ?>
environmentVariable=<?php echo get_option( 'swg-auth-environmentVariablea', 'NLS_LANG=american_america.utf8' ) . PHP_EOL; ?>
environmentVariable=<?php echo get_option( 'swg-auth-environmentVariableb', 'PATH+=/usr/lib/jvm/java-11-openjdk/bin:./' ) . PHP_EOL; ?>
environmentVariable=<?php echo get_option( 'swg-auth-environmentVariablec', 'LD_LIBRARY_PATH+=/usr/lib/jvm/java-11-openjdk/lib:/usr/lib/jvm/java-11-openjdk/lib/server:./' ) . PHP_EOL; ?>
<?php echo get_option( 'swg-auth-custom-server-setting' ); ?>
<?php
// After outputting the cfg, we don't want WordPress to continue
die;
}

View File

@@ -21,9 +21,28 @@ if ( $title ) {
// Find out if we're supposed to hide the lights
$hide_lights = isset( $instance['hide_lights'] ) ? $instance['hide_lights'] : false;
// Find out if we're supposed to show the highest population
$show_highest_population = isset( $instance['show_highest_population'] ) ? $instance['show_highest_population'] : false;
// Get the latest metrics data from the database
$data = get_option( 'swg-auth-metrics-data' );
// If we want to show the highest population, the code for that can exist in a function
if ( $show_highest_population ) {
function swg_auth_show_highest_population( $data, $format ) {
?>
<tr>
<td>Highest Population:</td>
<td><?php echo array_key_exists( 'highestPlayerCount', $data ) ? $data['highestPlayerCount'] : 'No Population Found'; ?></td>
</tr>
<tr>
<td>Record Set On:</td>
<td><?php echo array_key_exists( 'highestPlayerCountTimestamp', $data ) ? wp_date( $format, $data['highestPlayerCountTimestamp'] ) : 'No Timestamp Found'; ?></td>
</tr>
<?php
}
}
// Get the WordPress date and time format
$format = get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
@@ -56,6 +75,7 @@ if ( ! isset ( $data['clusterName'] ) ):
<td>Population:</td>
<td>0</td>
</tr>
<?php if ( $show_highest_population ) { swg_auth_show_highest_population( $data, $format ); } ?>
</table>
<?php
@@ -80,6 +100,7 @@ if ( ! isset ( $data['clusterName'] ) ):
<td>Population:</td>
<td>0</td>
</tr>
<?php if ( $show_highest_population ) { swg_auth_show_highest_population( $data, $format ); } ?>
</table>
<?php
@@ -104,6 +125,7 @@ if ( ! isset ( $data['clusterName'] ) ):
<td>Population:</td>
<td><?php echo $data['totalPlayerCount']; ?></td>
</tr>
<?php if ( $show_highest_population ) { swg_auth_show_highest_population( $data, $format ); } ?>
</table>
<?php

View File

@@ -29,6 +29,7 @@ class SWG_AUTH_METRICS_WIDGET extends WP_Widget {
// Get whatever settings have been set for this widget, or else use the defaults
$title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
$hide_lights = isset( $instance['hide_lights'] ) ? (bool) $instance['hide_lights'] : false;
$show_highest_population = isset( $instance['show_highest_population'] ) ? (bool) $instance['show_highest_population'] : false;
// Display some input fields to change the settings
?>
@@ -42,6 +43,11 @@ class SWG_AUTH_METRICS_WIDGET extends WP_Widget {
<label for="<?php echo $this->get_field_id( 'hide_lights' ); ?>">Hide LED Indicator Lights</label>
</p>
<p>
<input class="checkbox" id="<?php echo $this->get_field_id( 'show_highest_population' ); ?>" name="<?php echo $this->get_field_name( 'show_highest_population' ); ?>" type="checkbox" <?php checked( $show_highest_population ); ?> />
<label for="<?php echo $this->get_field_id( 'show_highest_population' ); ?>">Show Highest Population</label>
</p>
<?php
}
@@ -52,6 +58,8 @@ class SWG_AUTH_METRICS_WIDGET extends WP_Widget {
$instance['title'] = $new_instance['title'];
// Set the new value for hiding lights
$instance['hide_lights'] = isset( $new_instance['hide_lights'] ) ? (bool) $new_instance['hide_lights'] : false;
// Set the new value for showing the highest population
$instance['show_highest_population'] = isset( $new_instance['show_highest_population'] ) ? (bool) $new_instance['show_highest_population'] : false;
// Done. Save settings
return $instance;
}

View File

@@ -3,7 +3,7 @@
* Plugin Name: SWG Auth
* Plugin URI: https://tekaohswg.github.io/swg-auth-wordpress.html
* Description: Star Wars Galaxies Authentication for WordPress
* Version: 0.11
* Version: 0.13
* Author: Tekaoh
* Author URI: https://tekaohswg.github.io
*/
@@ -22,11 +22,13 @@ function swg_auth_run() {
include( plugin_dir_path( __FILE__ ) . 'includes/swg-auth-check.php' );
include( plugin_dir_path( __FILE__ ) . 'includes/swg-auth-admin-level-check.php' );
include( plugin_dir_path( __FILE__ ) . 'includes/swg-auth-metrics-listener.php' );
include( plugin_dir_path( __FILE__ ) . 'includes/swg-auth-webcfg.php' );
}
// Run Admin Stuff
include( plugin_dir_path( __FILE__ ) . 'admin/swg-auth-admin-menus.php' );
include( plugin_dir_path( __FILE__ ) . 'admin/swg-auth-settings.php' );
include( plugin_dir_path( __FILE__ ) . 'admin/swg-auth-server-settings.php' );
include( plugin_dir_path( __FILE__ ) . 'admin/swg-auth-user-settings.php' );
// Run Public Stuff

View File

@@ -27,3 +27,299 @@ function swg_auth_delete_user_meta() {
delete_user_meta( $user->ID, 'swg-auth-admin-level' );
}
}
// Delete SWG server settings
delete_option( 'swg-auth-BestResourcesEnabled' );
delete_option( 'swg-auth-CommunityCraftingLimit' );
delete_option( 'swg-auth-Corellian_Corvette_Imperial' );
delete_option( 'swg-auth-Corellian_Corvette_Neutral' );
delete_option( 'swg-auth-Corellian_Corvette_Rebel' );
delete_option( 'swg-auth-CraftingContract' );
delete_option( 'swg-auth-CrowdPleaser' );
delete_option( 'swg-auth-DSN' );
delete_option( 'swg-auth-Death_Watch' );
delete_option( 'swg-auth-DraftSchematicsEnabled' );
delete_option( 'swg-auth-Geonosian' );
delete_option( 'swg-auth-HeroicFlagEnabled' );
delete_option( 'swg-auth-MuseumEventDuration' );
delete_option( 'swg-auth-PoliticianEventDuration' );
delete_option( 'swg-auth-adminGodToAll' );
delete_option( 'swg-auth-adminGodToAllGodLevel' );
delete_option( 'swg-auth-aiLoggingEnabled' );
delete_option( 'swg-auth-allowMasterObjectCreation' );
delete_option( 'swg-auth-allowPlayersToPackVendors' );
delete_option( 'swg-auth-anniversary' );
delete_option( 'swg-auth-armorEnabled' );
delete_option( 'swg-auth-auth-type' );
delete_option( 'swg-auth-buffsEnabled' );
delete_option( 'swg-auth-builderEnabled' );
delete_option( 'swg-auth-byteCountWarnThreshold' );
delete_option( 'swg-auth-centralserver-key' );
delete_option( 'swg-auth-chatServiceBindInterface' );
delete_option( 'swg-auth-chroniclesChroniclerGoldTokenChanceOverride' );
delete_option( 'swg-auth-chroniclesChroniclerSilverTokenNumModifier' );
delete_option( 'swg-auth-chroniclesQuestorGoldTokenChanceOverride' );
delete_option( 'swg-auth-chroniclesQuestorSilverTokenNumModifier' );
delete_option( 'swg-auth-chroniclesXpModifier' );
delete_option( 'swg-auth-clientOverflowLimit' );
delete_option( 'swg-auth-cluster-name' );
delete_option( 'swg-auth-combatUpgradeReward' );
delete_option( 'swg-auth-commandsEnabled' );
delete_option( 'swg-auth-commoditiesMarketEnabled' );
delete_option( 'swg-auth-congestionWindowMinimum' );
delete_option( 'swg-auth-craftingEnabled' );
delete_option( 'swg-auth-createAppearances' );
delete_option( 'swg-auth-createZoneObjects' );
delete_option( 'swg-auth-creditsEnabled' );
delete_option( 'swg-auth-custom-server-setting' );
delete_option( 'swg-auth-customerServiceBindInterface' );
delete_option( 'swg-auth-dailyMissionXpLimit' );
delete_option( 'swg-auth-databaseProtocol' );
delete_option( 'swg-auth-debugMode' );
delete_option( 'swg-auth-debugReportLongFrames' );
delete_option( 'swg-auth-deedsEnabled' );
delete_option( 'swg-auth-deleteEventProps' );
delete_option( 'swg-auth-devEnabled' );
delete_option( 'swg-auth-developmentMode' );
delete_option( 'swg-auth-disableResources' );
delete_option( 'swg-auth-disableWorldSnapshot' );
delete_option( 'swg-auth-drainRate' );
delete_option( 'swg-auth-easyExternalAccess' );
delete_option( 'swg-auth-empireday_ceremony' );
delete_option( 'swg-auth-enable-adventure1' );
delete_option( 'swg-auth-enable-adventure2' );
delete_option( 'swg-auth-enable-corellia' );
delete_option( 'swg-auth-enable-dantooine' );
delete_option( 'swg-auth-enable-dathomir' );
delete_option( 'swg-auth-enable-dungeon1' );
delete_option( 'swg-auth-enable-endor' );
delete_option( 'swg-auth-enable-kashyyyk-dead-forest' );
delete_option( 'swg-auth-enable-kashyyyk-hunting' );
delete_option( 'swg-auth-enable-kashyyyk-main' );
delete_option( 'swg-auth-enable-kashyyyk-north-dungeons' );
delete_option( 'swg-auth-enable-kashyyyk-pob-dungeons' );
delete_option( 'swg-auth-enable-kashyyyk-rryatt-trail' );
delete_option( 'swg-auth-enable-kashyyyk-south-dungeons' );
delete_option( 'swg-auth-enable-lok' );
delete_option( 'swg-auth-enable-mustafar' );
delete_option( 'swg-auth-enable-naboo' );
delete_option( 'swg-auth-enable-rori' );
delete_option( 'swg-auth-enable-space-corellia' );
delete_option( 'swg-auth-enable-space-dantooine' );
delete_option( 'swg-auth-enable-space-dathomir' );
delete_option( 'swg-auth-enable-space-endor' );
delete_option( 'swg-auth-enable-space-heavy1' );
delete_option( 'swg-auth-enable-space-kashyyyk' );
delete_option( 'swg-auth-enable-space-light1' );
delete_option( 'swg-auth-enable-space-lok' );
delete_option( 'swg-auth-enable-space-naboo' );
delete_option( 'swg-auth-enable-space-nova-orion' );
delete_option( 'swg-auth-enable-space-npe-falcon' );
delete_option( 'swg-auth-enable-space-npe-falcon-2' );
delete_option( 'swg-auth-enable-space-npe-falcon-3' );
delete_option( 'swg-auth-enable-space-ord-mantell' );
delete_option( 'swg-auth-enable-space-tatooine' );
delete_option( 'swg-auth-enable-space-yavin4' );
delete_option( 'swg-auth-enable-talus' );
delete_option( 'swg-auth-enable-tatooine' );
delete_option( 'swg-auth-enable-tutorial' );
delete_option( 'swg-auth-enable-yavin4' );
delete_option( 'swg-auth-enableCovertImperialMercenary' );
delete_option( 'swg-auth-enableCovertRebelMercenary' );
delete_option( 'swg-auth-enableFlushAndConfirmAllData' );
delete_option( 'swg-auth-enableOvertImperialMercenary' );
delete_option( 'swg-auth-enableOvertRebelMercenary' );
delete_option( 'swg-auth-enablePreload' );
delete_option( 'swg-auth-environmentVariablea' );
delete_option( 'swg-auth-environmentVariableb' );
delete_option( 'swg-auth-environmentVariablec' );
delete_option( 'swg-auth-externalAdminLevelsEnabled' );
delete_option( 'swg-auth-factionEnabled' );
delete_option( 'swg-auth-fatalCallStackDepth' );
delete_option( 'swg-auth-fatalOnGoldPobChange' );
delete_option( 'swg-auth-flashSpeederReward' );
delete_option( 'swg-auth-foolsDay' );
delete_option( 'swg-auth-forceFoolsDay' );
delete_option( 'swg-auth-fragmentSize' );
delete_option( 'swg-auth-frameRateLimit' );
delete_option( 'swg-auth-gatewayServerIP' );
delete_option( 'swg-auth-gatewayServerPort' );
delete_option( 'swg-auth-gcwInvasionCityMaximumRunning' );
delete_option( 'swg-auth-gcwInvasionCycleTime' );
delete_option( 'swg-auth-gcwPointBonus' );
delete_option( 'swg-auth-gcwTokenBonus' );
delete_option( 'swg-auth-gcwcitybestine' );
delete_option( 'swg-auth-gcwcitydearic' );
delete_option( 'swg-auth-gcwcitykeren' );
delete_option( 'swg-auth-gcwraid' );
delete_option( 'swg-auth-goldenTicket' );
delete_option( 'swg-auth-goldenTicketDropChance' );
delete_option( 'swg-auth-goldenTicketsAvailable' );
delete_option( 'swg-auth-grantElderBuff' );
delete_option( 'swg-auth-grantGift' );
delete_option( 'swg-auth-halloween' );
delete_option( 'swg-auth-harvesterExtractionRateMultiplier' );
delete_option( 'swg-auth-hibernateDistance' );
delete_option( 'swg-auth-hibernateEnabled' );
delete_option( 'swg-auth-hibernateProxies' );
delete_option( 'swg-auth-idleLogoutTimeSec' );
delete_option( 'swg-auth-incomingBufferSize' );
delete_option( 'swg-auth-itvMinUsageLevel' );
delete_option( 'swg-auth-javaConsoleDebugMessages' );
delete_option( 'swg-auth-javaEngineProfiling' );
delete_option( 'swg-auth-javaLocalRefLimit' );
delete_option( 'swg-auth-javaVMName' );
delete_option( 'swg-auth-jediEnabled' );
delete_option( 'swg-auth-lifeday' );
delete_option( 'swg-auth-liveSpaceServer' );
delete_option( 'swg-auth-loadWholePlanet' );
delete_option( 'swg-auth-loaderThreads' );
delete_option( 'swg-auth-logBackloggedPacketThreshold' );
delete_option( 'swg-auth-loginserver-key' );
delete_option( 'swg-auth-loveday' );
delete_option( 'swg-auth-maxGoldNetworkId' );
delete_option( 'swg-auth-maxItemAttribBonus' );
delete_option( 'swg-auth-maxObjectSkillModBonus' );
delete_option( 'swg-auth-maxOutstandingBytes' );
delete_option( 'swg-auth-maxOutstandingPackets' );
delete_option( 'swg-auth-maxRawPacketSize' );
delete_option( 'swg-auth-maxRespecCount' );
delete_option( 'swg-auth-maxSocketSkillModBonus' );
delete_option( 'swg-auth-metricsServerPort' );
delete_option( 'swg-auth-minRespecIntervalInSeconds' );
delete_option( 'swg-auth-minutesActiveToUnaccessed' );
delete_option( 'swg-auth-minutesEmptyToEndangered' );
delete_option( 'swg-auth-minutesEndangeredToRemoved' );
delete_option( 'swg-auth-minutesUnaccessedToEndangered' );
delete_option( 'swg-auth-minutesVendorAuctionTimer' );
delete_option( 'swg-auth-minutesVendorItemTimer' );
delete_option( 'swg-auth-miscitemEnabled' );
delete_option( 'swg-auth-mountsEnabled' );
delete_option( 'swg-auth-nameValidationAcceptAll' );
delete_option( 'swg-auth-newbieTutorialEnabled' );
delete_option( 'swg-auth-noDataTimeout' );
delete_option( 'swg-auth-npeSequencersActive' );
delete_option( 'swg-auth-numTutorialServers' );
delete_option( 'swg-auth-odb-password' );
delete_option( 'swg-auth-odb-username' );
delete_option( 'swg-auth-oldestUnacknowledgedTimeout' );
delete_option( 'swg-auth-outgoingBufferSize' );
delete_option( 'swg-auth-overflowLimit' );
delete_option( 'swg-auth-packetHistoryMax' );
delete_option( 'swg-auth-pahallEnabled' );
delete_option( 'swg-auth-passthroughMode' );
delete_option( 'swg-auth-persisterThreads' );
delete_option( 'swg-auth-petsEnabled' );
delete_option( 'swg-auth-pingPort' );
delete_option( 'swg-auth-pooledPacketMax' );
delete_option( 'swg-auth-pooledPacketSize' );
delete_option( 'swg-auth-questEnabled' );
delete_option( 'swg-auth-regenActionScale' );
delete_option( 'swg-auth-regenBase' );
delete_option( 'swg-auth-regenConstant' );
delete_option( 'swg-auth-regenHealthScale' );
delete_option( 'swg-auth-regenMindScale' );
delete_option( 'swg-auth-regenScale' );
delete_option( 'swg-auth-regenerationRate' );
delete_option( 'swg-auth-registrarHost' );
delete_option( 'swg-auth-registrarPort' );
delete_option( 'swg-auth-reportMessages' );
delete_option( 'swg-auth-reservedObjectIds' );
delete_option( 'swg-auth-reservedPorta' );
delete_option( 'swg-auth-reservedPortb' );
delete_option( 'swg-auth-reservedPortc' );
delete_option( 'swg-auth-reservedPortd' );
delete_option( 'swg-auth-reservedPorte' );
delete_option( 'swg-auth-reservedPortf' );
delete_option( 'swg-auth-reservedPortg' );
delete_option( 'swg-auth-reservedPorth' );
delete_option( 'swg-auth-reservedPorti' );
delete_option( 'swg-auth-reservedPortj' );
delete_option( 'swg-auth-reservedPortk' );
delete_option( 'swg-auth-reservedPortl' );
delete_option( 'swg-auth-reservedPortm' );
delete_option( 'swg-auth-reservedPortn' );
delete_option( 'swg-auth-reservedPorto' );
delete_option( 'swg-auth-reservedPortp' );
delete_option( 'swg-auth-resourcesEnabled' );
delete_option( 'swg-auth-respecDurationAllowedInSeconds' );
delete_option( 'swg-auth-restussEvent' );
delete_option( 'swg-auth-restussPhase' );
delete_option( 'swg-auth-restussProgressionOn' );
delete_option( 'swg-auth-reverseEngineeringBonusMultipliert' );
delete_option( 'swg-auth-rlsDropChance' );
delete_option( 'swg-auth-rlsEnabled' );
delete_option( 'swg-auth-rlsExceptionalDropChance' );
delete_option( 'swg-auth-rlsLegendaryDropChance' );
delete_option( 'swg-auth-rlsMaxLevelsAbovePlayerLevel' );
delete_option( 'swg-auth-rlsMaxLevelsBelowPlayerLevel' );
delete_option( 'swg-auth-rlsMinDistanceFromLastLoot' );
delete_option( 'swg-auth-rlsMinTimeBetweenAwards' );
delete_option( 'swg-auth-rlsRareDropChance' );
delete_option( 'swg-auth-scriptPath' );
delete_option( 'swg-auth-scriptWatcherInterruptTime' );
delete_option( 'swg-auth-scriptWatcherWarnTime' );
delete_option( 'swg-auth-searchPath0' );
delete_option( 'swg-auth-searchPath1a' );
delete_option( 'swg-auth-searchPath1b' );
delete_option( 'swg-auth-searchPath2a' );
delete_option( 'swg-auth-searchPath2b' );
delete_option( 'swg-auth-sendBreadcrumbs' );
delete_option( 'swg-auth-sendPlayerTransform' );
delete_option( 'swg-auth-server-ip' );
delete_option( 'swg-auth-serverLoadLevel' );
delete_option( 'swg-auth-serverSpawnLimit' );
delete_option( 'swg-auth-serverSwitch' );
delete_option( 'swg-auth-serverutility-key' );
delete_option( 'swg-auth-sharedLoginMode' );
delete_option( 'swg-auth-shipsEnabled' );
delete_option( 'swg-auth-skillsEnabled' );
delete_option( 'swg-auth-spaceGcwCorelliaActive' );
delete_option( 'swg-auth-spaceGcwCorelliaDelay' );
delete_option( 'swg-auth-spaceGcwCorelliaStagger' );
delete_option( 'swg-auth-spaceGcwDantooineActive' );
delete_option( 'swg-auth-spaceGcwDantooineDelay' );
delete_option( 'swg-auth-spaceGcwDantooineStagger' );
delete_option( 'swg-auth-spaceGcwGunshipPlayerCeiling' );
delete_option( 'swg-auth-spaceGcwLengthOfBattle' );
delete_option( 'swg-auth-spaceGcwLokActive' );
delete_option( 'swg-auth-spaceGcwLokDelay' );
delete_option( 'swg-auth-spaceGcwLokStagger' );
delete_option( 'swg-auth-spaceGcwLossPointModifier' );
delete_option( 'swg-auth-spaceGcwLossTokenModifier' );
delete_option( 'swg-auth-spaceGcwMaxSupportShips' );
delete_option( 'swg-auth-spaceGcwNabooActive' );
delete_option( 'swg-auth-spaceGcwNabooDelay' );
delete_option( 'swg-auth-spaceGcwNabooStagger' );
delete_option( 'swg-auth-spaceGcwPobPlayerCeiling' );
delete_option( 'swg-auth-spaceGcwPointAward' );
delete_option( 'swg-auth-spaceGcwPrepatoryTime' );
delete_option( 'swg-auth-spaceGcwPvEPointModifier' );
delete_option( 'swg-auth-spaceGcwPvETokenModifier' );
delete_option( 'swg-auth-spaceGcwPvPPointModifier' );
delete_option( 'swg-auth-spaceGcwPvPTokenModifier' );
delete_option( 'swg-auth-spaceGcwTatooineActive' );
delete_option( 'swg-auth-spaceGcwTatooineDelay' );
delete_option( 'swg-auth-spaceGcwTatooineStagger' );
delete_option( 'swg-auth-spaceGcwTokenAward' );
delete_option( 'swg-auth-spaceGcwTotalSupportSpawn' );
delete_option( 'swg-auth-spaceGcwWinPointModifier' );
delete_option( 'swg-auth-spaceGcwWinTokenModifier' );
delete_option( 'swg-auth-spawnAllResourcess' );
delete_option( 'swg-auth-spawnersOn' );
delete_option( 'swg-auth-startX' );
delete_option( 'swg-auth-startY' );
delete_option( 'swg-auth-startZ' );
delete_option( 'swg-auth-suiListLimit' );
delete_option( 'swg-auth-useExternalAuth' );
delete_option( 'swg-auth-useTemplates' );
delete_option( 'swg-auth-validateClientVersion' );
delete_option( 'swg-auth-validateStationKey' );
delete_option( 'swg-auth-vehiclesEnabled' );
delete_option( 'swg-auth-veteranDebugEnableOverrideAccountAge' );
delete_option( 'swg-auth-veteranDebugTriggerAll' );
delete_option( 'swg-auth-warningCallStackDepth' );
delete_option( 'swg-auth-warpsEnabled' );
delete_option( 'swg-auth-weaponsEnabled' );
delete_option( 'swg-auth-webUpdateIntervalSeconds' );
delete_option( 'swg-auth-xpMultiplier' );

View File

@@ -2,8 +2,8 @@
Contributors: tekaoh
Tags: admin, integration
Requires at least: 2.8
Tested up to: 5.4
Stable tag: 0.11
Tested up to: 5.5
Stable tag: 0.13
Requires PHP: 4.3
License: The Unlicense
License URI: https://unlicense.org
@@ -23,6 +23,15 @@ If you're running a Star Wars Galaxies server, now you can use WordPress to mana
== Changelog ==
= 0.13 =
* Add server settings to admin dashboard (beta)
= 0.12 =
* Show a list of characters associated with an account
* Support JsonWebAPI for authentication
* Optionally display the highest population achieved on your server
* Minor appearance tweaks
= 0.11 =
* Secret keys can now be used to secure communications from SWG Server
* Fixed an issue where some settings couldn't be changed
@@ -65,6 +74,12 @@ If you're running a Star Wars Galaxies server, now you can use WordPress to mana
== Upgrade Notice ==
= 0.13 =
* Web Configs
= 0.12 =
* New features
= 0.11 =
* Secret Keys and Bug Fixes