Files
swg-auth-wordpress/swg-auth/uninstall.php
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

326 lines
15 KiB
PHP

<?php
// Don't run this if you're not actually unstalling
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
die;
}
// Delete installation settings
delete_option( 'swg-auth-approval-required' );
delete_option( 'swg-auth-metrics-data' );
delete_option( 'swg-auth-odb-username' );
delete_option( 'swg-auth-odb-password' );
delete_option( 'swg-auth-odb-sid' );
delete_option( 'swg-auth-odb-ip' );
delete_option( 'swg-auth-odb-port' );
delete_option( 'swg-auth-loginserver-key' );
delete_option( 'swg-auth-serverutility-key' );
delete_option( 'swg-auth-centralserver-key' );
// Delete user settings
swg_auth_delete_user_meta();
function swg_auth_delete_user_meta() {
$users = get_users();
foreach ( $users as $user ) {
delete_user_meta( $user->ID, 'swg-auth-approved' );
delete_user_meta( $user->ID, 'swg-auth-banned' );
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' );