mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Skin also filters dropbox urls like /texture. (Thanks goodlyay)
This commit is contained in:
parent
04b70d8297
commit
6263436d69
@ -69,6 +69,8 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
if (skin.Length == 0) skin = defSkin;
|
if (skin.Length == 0) skin = defSkin;
|
||||||
if (skin[0] == '+')
|
if (skin[0] == '+')
|
||||||
skin = "http://skins.minecraft.net/MinecraftSkins/" + skin.Substring(1) + ".png";
|
skin = "http://skins.minecraft.net/MinecraftSkins/" + skin.Substring(1) + ".png";
|
||||||
|
|
||||||
|
CmdTexture.FilterURL(ref skin);
|
||||||
return skin;
|
return skin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
permissions and limitations under the Licenses.
|
permissions and limitations under the Licenses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace MCGalaxy.Commands.World {
|
namespace MCGalaxy.Commands.CPE {
|
||||||
public sealed class CmdTexture : Command {
|
public sealed class CmdTexture : Command {
|
||||||
public override string name { get { return "Texture"; } }
|
public override string name { get { return "Texture"; } }
|
||||||
public override string type { get { return CommandTypes.Other; } }
|
public override string type { get { return CommandTypes.Other; } }
|
||||||
@ -84,7 +84,7 @@ namespace MCGalaxy.Commands.World {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void FilterURL(ref string url) {
|
internal static void FilterURL(ref string url) {
|
||||||
// a lot of people try linking to the dropbox page instead of directly to file, so we auto correct them
|
// a lot of people try linking to the dropbox page instead of directly to file, so we auto correct them
|
||||||
if (url.StartsWith("http://www.dropbox")) {
|
if (url.StartsWith("http://www.dropbox")) {
|
||||||
url = "http://dl.dropbox" + url.Substring("http://www.dropbox".Length);
|
url = "http://dl.dropbox" + url.Substring("http://www.dropbox".Length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user