Skip to content

Commit

Permalink
synapse: Added disable-rak option
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Jun 24, 2016
1 parent dc3f31f commit 9ea8126
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/pocketmine/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -1690,6 +1690,7 @@ public function loadAdvancedConfig(){
"isMainServer" => $this->getAdvancedProperty("synapse.is-main-server", true),
"password" => $this->getAdvancedProperty("synapse.server-password", "123456"),
"description" => $this->getAdvancedProperty("synapse.description", "A Synapse client"),
"disable-rak" => $this->getAdvancedProperty("synapse.disable-rak", false),
];
}

Expand Down Expand Up @@ -1823,7 +1824,9 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $

$this->loadAdvancedConfig();

if($this->expWriteAhead > 0) $this->generateExpCache($this->expWriteAhead);
if($this->expWriteAhead > 0){
$this->generateExpCache($this->expWriteAhead);
}

$this->logger->info("Loading server properties...");
$this->properties = new Config($this->dataPath . "server.properties", Config::PROPERTIES, [
Expand Down Expand Up @@ -1976,7 +1979,11 @@ public function __construct(\ClassLoader $autoloader, \ThreadedLogger $logger, $

$this->queryRegenerateTask = new QueryRegenerateEvent($this, 5);

$this->network->registerInterface(new RakLibInterface($this));
if(!$this->synapseConfig["enabled"] or ($this->synapseConfig["enabled"] and !$this->synapseConfig["disable-rak"])){
$this->network->registerInterface(new RakLibInterface($this));
}else{
$this->logger->notice("RakLib has been disabled by synapse.disable-rak option");
}

$this->pluginManager->loadPlugins($this->pluginPath);

Expand Down
6 changes: 5 additions & 1 deletion src/pocketmine/resources/genisys_eng.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#Version of this file
config:
version: 15
version: 16

level:
#Set if turn on the weather system
Expand Down Expand Up @@ -98,9 +98,13 @@ synapse:
enabled: false
server-ip: 127.0.0.1
server-port: 10305
#If this client is the lobby or the main server
is-main-server: true
server-password: 32bitlongkey
#Description of this client is the identifier of this client
description: "A Synapse client"
#Disable RakLib means that players can only join via Synapse
disable-rak: false

dserver:
#The count of all multi-server unified
Expand Down

0 comments on commit 9ea8126

Please sign in to comment.