Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ IonCube Priv8 Decoder V1 By H@CK3R $2H
- *
- * @ Version : 1
- * @ Author : H@CK3R $2H
- * @ Release on : 14-Feb-2014
- * @ Email : Hacker.S2h@Gmail.com
- *
- **/
- class MulticraftIntegration {
- var $api = null;
- var $clientData = array( );
- var $serverData = array( );
- var $clientId = null;
- var $serviceId = null;
- var $servicePlanId = null;
- var $userId = null;
- var $serverId = null;
- var $messages = array( );
- var $failed = false;
- var $lockFile = false;
- var $debugEnabled = false;
- var $mailOnSuccess = false;
- var $logAddress = '';
- var $logSender = 'localhost';
- var $action = null;
- var $deleteWorlds = false;
- var $retryTimes = 10;
- var $removeIp = false;
- var $assignedIps = '';
- var $dedipAvailable = array( );
- var $whmcsServer = 0;
- var $allowedDaemons = array( );
- var $location = '_default_';
- /**
- * Utility functions
- */
- function fail($error) {
- $this->failed = ;
- $this->debug( $error );
- return ;
- }
- function debug($msg) {
- $this->messages[] = htmlentities( $msg, ENT_QUOTES );
- return ;
- }
- function log() {
- $this->failed;
- ( $this->mailOnSuccess || );
- strlen( $this->logAddress );
- if (( ( $this->debugEnabled && ) && )) {
- $this->logSender;
- $from = ;
- $headers = 'From: ' . $from . '
- Reply-To: ' . $from;
- mail;
- $this->logAddress;
- if ($this->failed) {
- (true ? : );
- }
- . ': Multicraft Module: ';
- }
- @( . $this->action, @implode( $this->messages, '
- ' ) );
- return ;
- }
- function err($r) {
- while (true) {
- if (!) {
- return ;
- if (!) {
- if (!) {
- return ;
- return ;
- $str = '';
- foreach ($r['errors'] as ) {
- }
- }
- $e = ;
- }
- }
- if (strlen( $str )) {
- $str &= ', ';
- print_r( $e, true );
- }
- $str &= ;
- }
- return ;
- }
- function init($params) {
- while (true) {
- $this->serverData['slots'] = (int);
- $this->serverData['ram'] = (int);
- $this->serverData['jarfile'] = $params['configoption3'];
- if ($params['configoption4'] = 'Server JAR directory') {
- ;
- $params['configoption4'];
- }
- if ( = 'Server base directory') {
- (true ? : );
- $this->serverData['jardir'] = ;
- $this->serverData['user_jar'] = $params['configoption5'] = 'Yes';
- $this->serverData['user_name'] = $params['configoption6'] = 'Yes';
- $this->serverData['user_tasks'] = $params['configoption7'] = 'Yes';
- $params['configoption8'];
- }
- $this->serverData['user_ftp'] = = 'Yes';
- $this->serverData['user_visibility'] = $params['configoption9'] = 'Yes';
- $this->serverData['default_role'] = $params['configoption10'];
- $this->serverData['visibility'] = $params['configoption11'];
- $this->serverData['start'] = $params['configoption12'] = 'Yes';
- $this->serverData['dedip'] = $params['configoption13'];
- $this->serverData['ftp'] = $params['configoption14'] = 'Yes';
- array_map( 'trim', explode( ',', $params['configoption15'] ) );
- $allowed = ;
- $this->serverData['maxPerDaemon'] = (int);
- if ($params['configoption17'] = 'Include suspended') {
- $this->serverData['includeSuspended'] = (true ? : );
- $params['configoption18'] = 'Yes';
- $this->deleteWorlds = ;
- $params['configoption19'] != 'No';
- $this->debugEnabled = ;
- $params['configoption19'] = 'Yes';
- $this->mailOnSuccess = ;
- $params['configoption20'];
- $this->logAddress = ;
- $this->location;
- $loc = ;
- $this->allowedDaemons[$loc] = array( );
- foreach ($allowed as ) {
- $a = ;
- $m = array( );
- if (preg_match( '/([^:]+):(.*)/', $a, $m )) {
- $m[1];
- $loc = ;
- $m[2];
- $a = ;
- if ((int)) {
- (int);
- }
- break;
- }
- $this->allowedDaemons[$loc][] = ;
- break;
- }
- $this->serverData['ip'] = '';
- $this->serverData['port'] = '';
- $this->debug( 'Multicraft Service Module v2.5 starting' );
- mysql_query( 'select `hostname`, `username`, `accesshash` from `tblservers` where' . ' `id`=(select `server` from `tblhosting` where `id`=' . mysql_real_escape_string( intval( $params['serviceid'] ) ) . ')' );
- $r = ;
- if ($r) {
- mysql_fetch_row( $r );
- }
- }
- $row = ;
- mysql_free_result( $r );
- }
- $row = false;
- count( $row ) < 3;
- if (( ! || )) {
- }
- return ;
- }
- function lock() {
- $this->debug( 'Locking ' . __FILE__ );
- @fopen( __FILE__, 'rb' );
- $this->lockFile = ;
- !;
- }
- function unlock() {
- (bool);
- if (!) {
- return ;
- @flock( $this->lockFile, LOCK_UN );
- }
- @fclose( $this->lockFile );
- return ;
- }
- function end() {
- $this->unlock( );
- $this->log( );
- if (!) {
- }
- return ;
- }
- function install($params) {
- $this->action = ;
- if (!) {
- return ;
- $this->lock( );
- !;
- !;
- !;
- !;
- !;
- if (( ( ( ( ( ! || ) || ) || ) || ) || )) {
- return ;
- $this->unlock( );
- $this->createPlayer( );
- }
- }
- return ;
- }
- function terminate($params) {
- $this->action = ;
- if (!) {
- return ;
- $this->prepareTerminate;
- }
- if (!) {
- return ;
- $this->terminateServer;
- }
- ( );
- return ;
- }
- function suspend($params) {
- $this->action = ;
- if (!) {
- }
- return ;
- }
- function unsuspend($params) {
- $this->action = ;
- if (!) {
- }
- return ;
- }
- function serverAction($params, $action) {
- 'Server ' . $action;
- $this->action = ;
- if (!) {
- return ;
- if (!) {
- return ;
- $func = false;
- switch ($action) {
- case 'start': {
- $func = 'startServer';
- break ;
- switch ($action) {
- case 'stop': {
- $func = 'stopServer';
- break ;
- switch ($action) {
- case 'restart': {
- $func = 'restartServer';
- break ;
- $this->fail( 'Unhandled action "' . $action . '"' );
- }
- }
- }
- }
- }
- }
- }
- jmp;
- ( );
- $this->api->$func;
- $this->serverId;
- }
- ( );
- $r = ;
- if (!) {
- $this->fail;
- }
- ( 'Failed to run ' . $func . ' for server ' . $this->serverId . ': ' . $this->err( $r ) );
- return ;
- }
- function changePw($params) {
- $this->action = ;
- if (!) {
- return ;
- $this->changeUserPw;
- $params;
- }
- ( );
- return ;
- }
- function changePackage($params) {
- $this->action = ;
- if (!) {
- return ;
- $this->lock( );
- if (!) {
- $this->end( );
- }
- return ;
- $this->changeServerPackage( );
- $this->unlock( );
- $this->end( );
- }
- return ;
- }
- /**
- * Setup functionality
- */
- function checkFields($arr, $type) {
- foreach ($arr as ) {
- $v = ;
- $k = ;
- if (preg_match( '/user/i', $k )) {
- }
- $this->clientData['username'] = trim( $v );
- while (true) {
- $this->debug( 'Username set to "' . $this->clientData['username'] . '" from ' . $type . ' "' . $k . '".' );
- if (preg_match( '/location/i', $k )) {
- trim( $v );
- $this->location = ;
- $this->debug( 'Location set to "' . $this->location . '" from ' . $type . ' "' . $k . '".' );
- break;
- }
- }
- }
- return ;
- }
- function loadIps() {
- while (true) {
- mysql_query( 'select `assignedips` from `tblservers` where `id`=' . mysql_real_escape_string( intval( $this->whmcsServer ) ) );
- $r = ;
- $ip = '';
- if ($r) {
- mysql_fetch_row( $r );
- $ips = ;
- mysql_free_result( $r );
- !;
- if (( ! || )) {
- $ips = array( '' => );
- $ips[0];
- $this->assignedIps = ;
- @preg_split( '/\s+/', $ips[0] );
- }
- $ips = ;
- if (!) {
- }
- return ;
- $i = 11;
- if ($i < count( $ips )) {
- explode( ',', $ips[$i] );
- $cur = ;
- !;
- }
- }
- count( $cur ) < 2;
- if (( || )) {
- continue;
- $dmn = (int);
- ( && $dmn );
- strlen( $cur[1] );
- }
- if ((bool)) = true;
- ++;
- }
- return ;
- }
- function prepareInstall($params, $change = false) {
- intval( $params['clientsdetails']['userid'] );
- $this->clientId = ;
- intval( $params['serviceid'] );
- $this->serviceId = ;
- intval( $params['packageid'] );
- $this->servicePlanId = ;
- intval( $params['serverid'] );
- $this->checkFields( $params['customfields'], 'custom field' );
- $this->checkFields( $params['configoptions'], 'configurable option' );
- if (!) {
- $this->debug;
- 'No daemon list for location ' . $this->location;
- }
- ( . '. Setting to default location.' );
- $this->location = ;
- if (!) {
- return ;
- if (!) {
- return ;
- $this->loadIps( );
- $this->clientData['email'] = $params['clientsdetails']['email'];
- strlen;
- }
- }
- if (( $this->clientData['username'] )) {
- mysql_query( 'select count(*) from `tblhosting` where `userid`!=' . mysql_real_escape_string( intval( $this->clientId ) ) . ' and `username`=\'' . mysql_real_escape_string( $this->clientData['username'] ) . '\' and `server`=' . '(select `server` from `tblhosting` where `id`=' . mysql_real_escape_string( intval( $this->serviceId ) ) . ')' );
- $r = ;
- if ($r) {
- mysql_fetch_row( $r );
- $row = ;
- mysql_free_result( $r );
- if (0 < intval( $row[0] )) {
- return ;
- if (!) {
- $this->clientData['username'] = $params['username'];
- strlen( $this->clientData['username'] );
- }
- if (!) {
- $this->clientData['username'] = $this->clientData['email'];
- if (!) {
- return ;
- if (!) {
- return ;
- if (!) {
- return ;
- $this->getServerId( $params, false );
- ( && $this->serverId );
- !;
- }
- }
- }
- }
- if ((bool)) {
- return ;
- $this->debug;
- }
- }
- }
- }
- ( 'Verified data for client ' . $this->clientId . ', service ' . $this->serviceId . ', plan ' . $this->servicePlanId . ': Username "' . $this->clientData['username'] . '", slots ' . $this->serverData['slots'] . ', RAM ' . $this->serverData['ram'] );
- mysql_query( 'select `password` from `tblhosting` where `userid`=' . mysql_real_escape_string( intval( $this->clientId ) ) . ' and `username`=\'' . mysql_real_escape_string( $this->clientData['username'] ) . '\' and `server`=' . '(select `server` from `tblhosting` where `id`=' . mysql_real_escape_string( intval( $this->serviceId ) ) . ')' );
- $r = $this->whmcsServer = ;
- if ($r) {
- mysql_fetch_row( $r );
- $row = ;
- mysql_free_result( $r );
- decrypt;
- strval;
- $row[0];
- }
- ( ( ) );
- $pw = ;
- $this->clientData['password'] = $pw;
- if (strlen( $pw )) {
- $this->debug( 'Got password from database.' );
- if (!) = ;
- if (!) {
- $this->clientData['password'] = substr( md5( rand( ) ), 0, 8 );
- $this->debug( 'Generated new password: ' . $this->clientData['password'] );
- }
- jmp;
- ['password'];
- }
- ( 'Got existing password: ' . );
- return ;
- }
- function saveServerIp() {
- $ipStr = $this->serverData['ip'] . ':' . $this->serverData['port'];
- $this->debug( 'Setting IP of ' . $this->serviceId . ' to ' . $ipStr );
- mysql_query( 'update `tblhosting` set `dedicatedip`=\'' . mysql_real_escape_string( $ipStr ) . '\',' . ' `domain`=\'' . mysql_real_escape_string( intval( $this->serverId ) ) . '\'' . ' where `id`=' . mysql_real_escape_string( intval( $this->serviceId ) ) );
- $r = ;
- if (!) {
- return ;
- if ($this->removeIp) {
- mysql_query;
- 'update `tblservers` set `assignedips`=\'' . mysql_real_escape_string( $this->assignedIps ) . '\'' . ' where `id`=';
- mysql_real_escape_string;
- intval;
- }
- ( . ( ( $this->whmcsServer ) ) );
- $r = ;
- }
- if (!) {
- }
- $this->fail( 'Warning: Failed to add/remove IP from "Assigned IP Addresses"!' );
- return ;
- }
- function getUsedResources($daemon) {
- $this->api->getConnectionMemory( $daemon, $this->serverData['includeSuspended'] );
- $r = ;
- if (!) {
- $this->debug( 'Error getting memory information for daemon ' . $daemon . ': ' . $this->err( $r ) );
- $freeRam = 10;
- $r['data']['used'];
- $usedRam = ;
- $r['data'];
- }
- ['total'];
- $totalRam = ;
- if (!) {
- $this->serverData['ram'];
- $freeRam = $this->debug( 'Daemon ' . $daemon . ' has no available memory amount set.' );
- }
- jmp;
- return ;
- }
- function getDaemonPort() {
- $this->api->listConnections( );
- $r = ;
- if (!) {
- $this->fail( 'Error getting connections: ' . $this->err( $r ) );
- $r['data']['Daemons'];
- $daemons = ;
- $this->allowedDaemons[$this->location];
- $allowed = ;
- if (count( $allowed )) {
- $this->debug;
- if ($this->location != '_default_') {
- ' for location ' . $this->location;
- ( 'Allowed daemons' . (true ? : ) . ': ' . implode( ', ', $allowed ) );
- $daemon = 11;
- $this->serverData['maxPerDaemon'];
- $max = ;
- foreach ($daemons as ) {
- $n = ;
- $d = ;
- }
- }
- }
- }
- !;
- if (( count( $allowed ) && )) {
- $this->debug;
- 'Skipping daemon ' . $d;
- }
- ( . '. Not in allowed daemon list.' );
- continue;
- !;
- if (( $this->serverData['dedip'] = 'Yes' && )) {
- $this->debug( 'Skipping daemon ' . $d . '. Dedicated IP requested but none available for this daemon.' );
- }
- continue;
- $this->getUsedResources( $d );
- $rc = ;
- if ($rc['freeRam'] < $this->serverData['ram']) {
- $this->debug( 'Skipping daemon ' . $d . '. Memory used: ' . $rc['usedRam'] . '/' . $rc['totalRam'] . ', free: ' . $rc['freeRam'] . ', requested: ' . $this->serverData['ram'] );
- continue;
- $rc['count'];
- $count = ;
- $max <= $count;
- if (( $max && )) {
- $this->debug;
- 'Skipping daemon ' . $d;
- }
- ( . '. Servers: ' . $count . '/' . $max );
- continue;
- $daemon = $max;
- break ;
- }
- if (!) {
- $this->fail;
- if (count( $this->messages )) {
- ' (' . @end( $this->messages ) . ')';
- return ;
- $this->serverData['daemonId'] = $daemon;
- $this->serverData['port'] = '';
- $this->debug;
- 'Creating server on daemon ' . $this->serverData['daemonId'];
- }
- }
- ( );
- return ;
- }
- function getServerIp() {
- @preg_split( '/\s+/', $this->assignedIps );
- $ips = ;
- if (!) {
- $ips = array( );
- $rem = array( );
- $i = 12;
- if ($i < count( $ips )) {
- explode( ',', $ips[$i] );
- $cur = ;
- $dmn = false;
- }
- function saveUser() {
- (bool);
- mysql_query( 'update `tblhosting` set `username`=\'' . mysql_real_escape_string( $this->clientData['username'] ) . '\',' . ' `password`=\'' . mysql_real_escape_string( encrypt( $this->clientData['password'] ) ) . '\'' . ' where `id`=' . mysql_real_escape_string( intval( $this->serviceId ) ) );
- $r = ;
- if (!) {
- }
- return ;
- }
- function createUser() {
- if (!) {
- return ;
- $this->api->findUsers( 'email', '=' . $this->clientData['email'] );
- $r = ;
- if (!) {
- return ;
- $r['data']['Users'];
- $user = ;
- $this->userId = ;
- foreach ($user as ) {
- $name = ;
- $id = ;
- $this->userId = ;
- $this->clientData['username'] = $name;
- $this->debug;
- 'Found user "' . $name . '" (' . $id;
- }
- }
- }
- . ') with same email (';
- $this->clientData;
- }
- }
- ( . ['email'] . '). Reusing.' );
- return ;
- }
- function createServer() {
- preg_replace( '/[^-_\w\d .!()]/', '_', $this->clientData['username'] );
- $baseDir = ;
- $this->api->createServer( $this->clientData['username'] . '\'s Minecraft Server', 25564, $baseDir . '_' . $this->serverData['port'], $this->serverData['slots'] );
- $r = ;
- $id = 10;
- $r['data']['id'];
- !;
- if (( ! || )) {
- return ;
- $this->debug( 'Created server ' . $id );
- $strToLv = array( 'No Access' => 0, 'Guest' => 10, 'User' => 20, 'Moderator' => 30 );
- $strToLv[$this->serverData['default_role']];
- $level = ;
- if (!) {
- $level = 10;
- $strToVisible = array( 'Owner only' => 0, 'By Default Role' => 1, 'Users with Roles only' => 2 );
- $strToVisible[$this->serverData['visibility']];
- $visible = ;
- if (!) {
- $visible = 10;
- $this->api->findServers( 'dir', '=server' . $id );
- $r = ;
- count( $r['data']['Servers'] );
- if (( is_array( $r['data']['Servers'] ) && )) {
- $baseDir = $baseDir . '_' . $id;
- }
- }
- }
- }
- else {
- if (!) {
- return ;
- $this->api->updateServerConfig;
- $id;
- array( 'user_jar' => , 'user_name' => , 'user_schedule' => , 'user_ftp' => , 'user_visibility' => , 'visible' => );
- }
- }
- ( array( $this->serverData['user_jar'] => , $this->serverData['user_name'] => , $this->serverData['user_tasks'] => , $this->serverData['user_ftp'] => , $this->serverData['user_visibility'] => , $visible => ) );
- $r = ;
- if (!) {
- return ;
- $this->api->setServerOwner( $id, $this->userId );
- $this->api->getServer( $id );
- $r = ;
- if (!) {
- return ;
- $this->serverData['port'] = $r['data']['Server']['port'];
- }
- $this->serverData['ip'] = $r['data']['Server']['ip'];
- if ($this->serverData['ftp']) {
- $this->api->setUserFtpAccess( $this->userId, $id, 'rw' );
- if ($this->serverData['start']) {
- $this->api->startServer;
- $id;
- }
- ( );
- $this->serverId = ;
- }
- }
- if ($this->serverData['start']) {
- ;
- }
- $this->debug( 'Server ' . $this->serverId . ' configured' . );
- return ;
- }
- function createPlayer() {
- $this->api->createPlayer( $this->serverId, $this->clientData['username'] );
- $r = ;
- if (!) {
- $this->debug;
- 'Error creating player for server ' . $this->serverId . ': ' . $this->err( $r );
- }
- return ;
- }
- /**
- * Helper functions
- */
- function getServerId($params, $fail = true) {
- while (true) {
- $params['clientsdetails']['userid'];
- $this->clientId = ;
- $params['serviceid'];
- $this->serviceId = ;
- $r = mysql_query( 'select `domain` from `tblhosting` where `id`=' . mysql_real_escape_string( intval( $this->serviceId ) ) );
- if ($r) {
- $row = mysql_fetch_row( $r );
- mysql_free_result( $r );
- count( $row );
- if (( is_array( $row ) && )) {
- }
- }
- (int);
- $this->serverId = ;
- }
- $this->serverId = ;
- if (( ! && )) {
- }
- return ;
- }
- /**
- * Terminate functionality
- */
- function prepareTerminate($params) {
- $params['serverid'];
- $this->whmcsServer = ;
- $this->getServerId( $params );
- return ;
- }
- function terminateServer() {
- 'Terminating server ' . $this->serverId . '. ';
- if ($this->deleteWorlds) {
- ( . (true ? : ) . ' Worlds.' );
- $this->api->getServer( $this->serverId );
- $r = ;
- if (!) {
- return ;
- $r['data']['Server']['daemon_id'];
- $curDmn = ;
- $r['data']['Server']['port'];
- $curPort = ;
- $r['data']['Server']['ip'];
- }
- }
- $curIp = ;
- if ($this->deleteWorlds) {
- $this->api->stopServer( $this->serverId );
- $r = ;
- if (!) {
- $this->debug( 'Warning: Failed to stop server ' . $this->serverId . ' (worlds will not get deleted): ' . $this->err( $r ) );
- $this->retryTimes;
- $retry = ;
- $i = 11;
- if ($i < $retry) {
- $this->api->deleteServer;
- $this->serverId;
- if ($this->deleteWorlds) {
- ( (true ? : ) );
- $r = ;
- if ($r['success']) {
- }
- }
- }
- }
- break ;
- if (isset( $r['errors'][0]['deleteDir'][0] )) {
- $r['errors'][0]['deleteDir'][0];
- $dir = (true ? : );
- @preg_match( '/Server still running/', $dir );
- }
- /**
- * Password change functionality
- **/
- function changeUserPw($params) {
- (bool);
- if (!) {
- return ;
- mysql_query;
- 'update tblhosting set password=\'' . mysql_real_escape_string( encrypt( $params['password'] ) ) . '\'' . ' where userid=';
- mysql_real_escape_string;
- intval( $params['clientsdetails']['userid'] );
- }
- ( . ( ) . ' and server=' . mysql_real_escape_string( intval( $params['serverid'] ) ) . ' and username=\'' . mysql_real_escape_string( $params['username'] ) . '\'' );
- $r = ;
- if (!) {
- $this->debug( 'Failed to update other services using the same Multicraft user: ' . mysql_error( ) );
- $this->api->findUsers( 'name', '=' . $params['username'] );
- $r = ;
- if (!) {
- return ;
- $r['data']['Users'];
- $user = ;
- !;
- }
- count( $user ) !== 1;
- }
- /**
- * Package change functionality
- **/
- function changeServerPackage() {
- (bool);
- $this->api->getServer( $this->serverId );
- $r = ;
- if (!) {
- return ;
- $r['data']['Server']['memory'];
- $curRam = ;
- $r['data']['Server']['daemon_id'];
- $curDmn = ;
- $r['data']['Server']['port'];
- $curPort = ;
- $r['data']['Server']['ip'];
- $curIp = ;
- $this->serverData['daemonId'] = $curDmn;
- $this->serverData['port'] = $curPort;
- $this->updateServer( );
- $this->hasDedip( $curDmn, $curIp, $curPort );
- $hasDedip = ;
- !;
- ( $this->serverData['dedip'] = 'Yes' && );
- ( $this->serverData['dedip'] = 'No' && );
- if (( ( $this->serverData['daemonId'] != $curDmn || ) || )) {
- $this->loadIps( );
- if (!) {
- return ;
- if ($hasDedip) {
- $this->recycleIp( $curDmn, $curIp, $curPort );
- $this->api->updateServer;
- $this->serverId;
- array( 'ip' => , 'port' => );
- array( $this->serverData['ip'] => );
- $this->serverData['port'];
- }
- }
- array( => );
- }
- }
- ( );
- $r = ;
- if (!) {
- return ;
- $this->api->getServer( $this->serverId );
- $r = ;
- if (!) {
- return ;
- $this->serverData['port'] = $r['data']['Server']['port'];
- $r['data']['Server']['ip'];
- }
- }
- $this->serverData['ip'] = ;
- if (!) {
- return ;
- if ($this->serverData['daemonId'] != $curDmn) {
- $this->api->sendServerControl( $this->serverId, 'migrate ' . $this->serverData['daemonId'] );
- $r = ;
- !;
- }
- }
- }
- }
- }
- if () {
- $this->fail;
- 'Server migrate command failed for server ' . $this->serverId . ': ';
- $this->err;
- }
- ( . $this->debug( $r ) );
- $this->debug( 'Server migrate command sent to daemon ' . $curPort . ', moving to daemon ' . $this->serverData['daemonId'] );
- return ;
- }
- function hasDedip($dmn, $ip, $port) {
- $this->debug( 'Checking for dedicated IP: ' . $ip );
- $r = $this->api->getConnection( $dmn );
- if (!) {
- return ;
- $daemonIp = $r['data']['Daemon']['ip'];
- $ip != '0.0.0.0';
- }
- function recycleIp($dmn, $ip, $port) {
- (bool);
- $this->debug( 'Recycling IP ' . $ip );
- '
- ' . $dmn . ',' . $ip;
- $this->assignedIps &= ;
- $this->removeIp = ;
- $this->debug( 'IP ' . $ip . ' will be written back to assigned IPs list' );
- return ;
- }
- function updateServer() {
- $this->debug( 'Updating server ' . $this->serverId );
- $this->serverId;
- $id = ;
- $this->api->updateServer( $id, array( 'memory' => , 'players' => , 'jardir' => ), array( $this->serverData['ram'] => , $this->serverData['slots'] => , $this->serverData['jardir'] => ) );
- $r = ;
- if (!) {
- return ;
- $this->api->updateServerConfig( $id, array( 'user_jar' => , 'user_name' => , 'user_schedule' => , 'user_ftp' => ), array( $this->serverData['user_jar'] => , $this->serverData['user_name'] => , $this->serverData['user_tasks'] => , $this->serverData['user_ftp'] => ) );
- $r = ;
- if (!) {
- $this->fail;
- $this->err;
- $r;
- }
- }
- return ;
- }
- }
- function multicraft_ConfigOptions() {
- return ;
- }
- function multicraft_CreateAccount($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_TerminateAccount($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_SuspendAccount($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_UnsuspendAccount($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_ChangePassword($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_ChangePackage($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_ClientArea($params) {
- return ;
- }
- function multicraft_AdminLink($params) {
- return ;
- }
- function multicraft_LoginLink($params) {
- echo ;
- return ;
- }
- function multicraft_AdminCustomButtonArray() {
- return ;
- }
- function multicraft_start($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_stop($params) {
- new ( );
- $mc = ;
- return ;
- }
- function multicraft_restart($params) {
- new ( );
- $mc = ;
- return ;
- }
- if (!) {
- }
- require( 'MulticraftAPI.php' );
- return ;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement