mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 20:53:40 -04:00
Fix /model not checking extra permission to change models of other players/bots (Thanks Princess_Bloom), add an extra permission to /skin for changing other player's skins.
This commit is contained in:
parent
831142961d
commit
996d2cd8d6
@ -67,6 +67,7 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
model = message;
|
model = message;
|
||||||
}
|
}
|
||||||
model = model.ToLower();
|
model = model.ToLower();
|
||||||
|
if ((isBot || who != p) && !CheckExtraPerm(p)) { MessageNeedPerms(p, "can change the model of other players."); return; }
|
||||||
|
|
||||||
if (isBot) {
|
if (isBot) {
|
||||||
pBot.model = model;
|
pBot.model = model;
|
||||||
|
@ -27,6 +27,9 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
public override string type { get { return CommandTypes.Other; } }
|
public override string type { get { return CommandTypes.Other; } }
|
||||||
public override bool museumUsable { get { return true; } }
|
public override bool museumUsable { get { return true; } }
|
||||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||||
|
public override CommandPerm[] AdditionalPerms {
|
||||||
|
get { return new[] { new CommandPerm(LevelPermission.Operator, "+ can change the skin of other players") }; }
|
||||||
|
}
|
||||||
static char[] trimChars = { ' ' };
|
static char[] trimChars = { ' ' };
|
||||||
|
|
||||||
public override void Use(Player p, string message) {
|
public override void Use(Player p, string message) {
|
||||||
@ -58,6 +61,8 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
if (!Player.ValidName(skin)) {
|
if (!Player.ValidName(skin)) {
|
||||||
Player.Message(p, "\"" + skin + "\" is not a valid skin name."); return;
|
Player.Message(p, "\"" + skin + "\" is not a valid skin name."); return;
|
||||||
}
|
}
|
||||||
|
if ((isBot || who != p) && !CheckExtraPerm(p)) { MessageNeedPerms(p, "can change the skin of other players."); return; }
|
||||||
|
|
||||||
if (isBot) {
|
if (isBot) {
|
||||||
pBot.skinName = skin;
|
pBot.skinName = skin;
|
||||||
pBot.GlobalDespawn();
|
pBot.GlobalDespawn();
|
||||||
|
@ -297,7 +297,7 @@ namespace MCGalaxy.Commands
|
|||||||
// I need to add the ability to delete a single zone, I need help!
|
// I need to add the ability to delete a single zone, I need help!
|
||||||
if (value == "ALL" || value == "") {
|
if (value == "ALL" || value == "") {
|
||||||
Command zone = Command.all.Find("zone");
|
Command zone = Command.all.Find("zone");
|
||||||
Command click = Command.all.Find("click");
|
Command click = Command.all.Find("mark");
|
||||||
zone.Use(p, "del all");
|
zone.Use(p, "del all");
|
||||||
click.Use(p, "0 0 0");
|
click.Use(p, "0 0 0");
|
||||||
}
|
}
|
||||||
|
12
GUI/Window.Designer.cs
generated
12
GUI/Window.Designer.cs
generated
@ -40,18 +40,6 @@ namespace MCGalaxy.Gui
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void WndProc(ref Message msg)
|
|
||||||
{
|
|
||||||
/*const int WM_SIZE = 0x0005;
|
|
||||||
const int SIZE_MINIMIZED = 1;
|
|
||||||
if ((msg.Msg == WM_SIZE) && ((int)msg.WParam == SIZE_MINIMIZED) && (Window.Minimize != null))
|
|
||||||
{
|
|
||||||
this.Window_Minimize(this, EventArgs.Empty);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
base.WndProc(ref msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user