Fix -hax not working if color in the motd.

This commit is contained in:
UnknownShadow200 2016-09-04 21:58:44 +10:00
parent e12500c264
commit df0bf301f2
2 changed files with 5 additions and 2 deletions

View File

@ -31,6 +31,7 @@ namespace MCGalaxy {
public static byte[] MakeHackControl(Player p) {
string motd = p.level.GetMotd(p);
motd = Colors.StripColors(motd);
bool isOp = p.Rank >= LevelPermission.Operator;
bool fly = true, noclip = true, speed = true, respawn = true, _3rdPerson = true;

View File

@ -300,8 +300,10 @@ namespace MCGalaxy {
if (OnSendMOTD != null) OnSendMOTD(this, packet);
Send(packet);
if (HasCpeExt(CpeExt.HackControl))
Send(Hacks.MakeHackControl(this));
if (!HasCpeExt(CpeExt.HackControl)) return;
Send(Hacks.MakeHackControl(this));
if (Game.Referee)
Send(Packet.MakeHackControl(true, true, true, true, true, -1));
}
public void SendMap(Level oldLevel) { SendRawMap(oldLevel, level); }