mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-23 20:04:02 +00:00
Merge branch 'legacy/alpha11'
This commit is contained in:
commit
906442136b
@ -126,7 +126,7 @@ class TimingsCommand extends VanillaCommand{
|
|||||||
}
|
}
|
||||||
list(, $headers) = $result;
|
list(, $headers) = $result;
|
||||||
foreach($headers as $headerGroup){
|
foreach($headers as $headerGroup){
|
||||||
if(isset($headerGroup["location"]) and preg_match('#^http://paste\\.ubuntu\\.com/([0-9]{1,})/#', trim($headerGroup["location"]), $match)){
|
if(isset($headerGroup["location"]) and preg_match('#^http://paste\\.ubuntu\\.com/([A-Za-z0-9+\/=]+)/#', trim($headerGroup["location"]), $match)){
|
||||||
$pasteId = $match[1];
|
$pasteId = $match[1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -134,7 +134,7 @@ class TimingsCommand extends VanillaCommand{
|
|||||||
if(isset($pasteId)){
|
if(isset($pasteId)){
|
||||||
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsUpload", ["http://paste.ubuntu.com/" . $pasteId . "/"]));
|
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsUpload", ["http://paste.ubuntu.com/" . $pasteId . "/"]));
|
||||||
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsRead",
|
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.timingsRead",
|
||||||
["http://" . $sender->getServer()->getProperty("timings.host", "timings.pmmp.io") . "/?url=$pasteId"]));
|
["http://" . $sender->getServer()->getProperty("timings.host", "timings.pmmp.io") . "/?url=" . urlencode($pasteId)]));
|
||||||
}else{
|
}else{
|
||||||
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.pasteError"));
|
$sender->sendMessage(new TranslationContainer("pocketmine.command.timings.pasteError"));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user