mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-05 17:41:46 +00:00
Moved the RAKNET_MAGIC constant
This commit is contained in:
parent
6e4141f140
commit
2e0d49a2ba
@ -562,7 +562,7 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->send(0x08, array(
|
$this->send(0x08, array(
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->server->serverID,
|
$this->server->serverID,
|
||||||
$this->port,
|
$this->port,
|
||||||
$data[3],
|
$data[3],
|
||||||
|
@ -529,7 +529,7 @@ class PocketMinecraftServer{
|
|||||||
$this->send(0x1c, array(
|
$this->send(0x1c, array(
|
||||||
$data[0],
|
$data[0],
|
||||||
$this->serverID,
|
$this->serverID,
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->serverType,
|
$this->serverType,
|
||||||
), false, $packet["ip"], $packet["port"]);
|
), false, $packet["ip"], $packet["port"]);
|
||||||
break;
|
break;
|
||||||
@ -538,7 +538,7 @@ class PocketMinecraftServer{
|
|||||||
$this->send(0x1c, array(
|
$this->send(0x1c, array(
|
||||||
$data[0],
|
$data[0],
|
||||||
$this->serverID,
|
$this->serverID,
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->serverType. $this->name . " [You're banned]",
|
$this->serverType. $this->name . " [You're banned]",
|
||||||
), false, $packet["ip"], $packet["port"]);
|
), false, $packet["ip"], $packet["port"]);
|
||||||
break;
|
break;
|
||||||
@ -555,7 +555,7 @@ class PocketMinecraftServer{
|
|||||||
$this->send(0x1c, array(
|
$this->send(0x1c, array(
|
||||||
$data[0],
|
$data[0],
|
||||||
$this->serverID,
|
$this->serverID,
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->serverType. $this->name . " [".($this->gamemode === CREATIVE ? "C":($this->gamemode === ADVENTURE ? "A":"S")).($this->whitelist !== false ? "W":"")." ".count($this->clients)."/".$this->maxClients."] ".$txt,
|
$this->serverType. $this->name . " [".($this->gamemode === CREATIVE ? "C":($this->gamemode === ADVENTURE ? "A":"S")).($this->whitelist !== false ? "W":"")." ".count($this->clients)."/".$this->maxClients."] ".$txt,
|
||||||
), false, $packet["ip"], $packet["port"]);
|
), false, $packet["ip"], $packet["port"]);
|
||||||
$this->custom["times_".$CID] = ($this->custom["times_".$CID] + 1) % strlen($this->description);
|
$this->custom["times_".$CID] = ($this->custom["times_".$CID] + 1) % strlen($this->description);
|
||||||
@ -585,12 +585,12 @@ class PocketMinecraftServer{
|
|||||||
console("[DEBUG] Incorrect structure #$version from ".$packet["ip"].":".$packet["port"], true, true, 2);
|
console("[DEBUG] Incorrect structure #$version from ".$packet["ip"].":".$packet["port"], true, true, 2);
|
||||||
$this->send(0x1a, array(
|
$this->send(0x1a, array(
|
||||||
CURRENT_STRUCTURE,
|
CURRENT_STRUCTURE,
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->serverID,
|
$this->serverID,
|
||||||
), false, $packet["ip"], $packet["port"]);
|
), false, $packet["ip"], $packet["port"]);
|
||||||
}else{
|
}else{
|
||||||
$this->send(0x06, array(
|
$this->send(0x06, array(
|
||||||
MAGIC,
|
RAKNET_MAGIC,
|
||||||
$this->serverID,
|
$this->serverID,
|
||||||
0,
|
0,
|
||||||
strlen($packet["raw"]),
|
strlen($packet["raw"]),
|
||||||
|
@ -41,7 +41,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH);
|
|||||||
|
|
||||||
ini_set("memory_limit", "256M"); //Default
|
ini_set("memory_limit", "256M"); //Default
|
||||||
define("LOG", true);
|
define("LOG", true);
|
||||||
define("MAGIC", "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78");
|
|
||||||
define("TEST_MD5", "ffe889db5932db1e3371d48773590e59");
|
define("TEST_MD5", "ffe889db5932db1e3371d48773590e59");
|
||||||
define("MAJOR_VERSION", "Alpha_1.3dev");
|
define("MAJOR_VERSION", "Alpha_1.3dev");
|
||||||
define("CURRENT_STRUCTURE", 5);
|
define("CURRENT_STRUCTURE", 5);
|
||||||
|
@ -25,6 +25,7 @@ the Free Software Foundation, either version 3 of the License, or
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
define("RAKNET_MAGIC", "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78");
|
||||||
|
|
||||||
define("MC_KEEP_ALIVE", 0x00);
|
define("MC_KEEP_ALIVE", 0x00);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class Packet{
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "magic":
|
case "magic":
|
||||||
$this->addRaw(MAGIC);
|
$this->addRaw(RAKNET_MAGIC);
|
||||||
break;
|
break;
|
||||||
case "float":
|
case "float":
|
||||||
$this->addRaw(Utils::writeFloat($this->data[$field]));
|
$this->addRaw(Utils::writeFloat($this->data[$field]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user