mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-09 15:23:28 -04:00
H:/PortableApps/GitPortable/App/Git/texture without a url prints current value for that scope (Thanks goodlyay), fix /undo not working from IRC/Console after restart, changelog.txt finally actually updated.
This commit is contained in:
parent
67afd26e10
commit
b387d1c258
@ -1,3 +1,79 @@
|
||||
v1.8.0.0
|
||||
- Fixed /undo from console and IRC not doing anything after restart.
|
||||
- /texture with a scope without a url will output the current url for that scope.
|
||||
- Fixed not being able to whisper from console.
|
||||
- Fixed /portal show not working.
|
||||
- Fixed 'survival' mode not working properly.
|
||||
- Implemented EnvMapAppearance version 2, allowing usage of .zip texture packs, changing of cloud height, and limiting to a max fog distance.
|
||||
- Fixed cases where some IRC colour codes were not being converted.
|
||||
- Fixed code page 437 characters not working with IRC.
|
||||
- Add 'buildable' and 'deleteable' properties to maps, allowing building/deleting to be disabled client side.
|
||||
- Fixed IRC announcing secondary disconnect of hidden players.
|
||||
- Added /pclients command which outputs which clients the players are using.
|
||||
- Implemented BlockDefinitions, with a /gb command to go with it.
|
||||
- Removed 'GrieferStone' and old 'Anti-tunneling' code.
|
||||
- Fix guns not being disabled on maps that didn't allow guns.
|
||||
- Implement a new undo binary file format that is much more efficient space and parsing wise.
|
||||
- Removed /quick.
|
||||
- Removed the old and broken translation stuff.
|
||||
- Fixed some .x IRC commands crashing the server.
|
||||
- Fixed /players <rankname> not working.
|
||||
- Fixed global chat not working.
|
||||
- Implemented CPE LongerMessages extension.
|
||||
- Added /reach, allowing players to place/delete blocks further away.
|
||||
- Removed /megaboid, removed old MCForge protection code.
|
||||
- Fixed /spin not working on recent mono versions.
|
||||
- Optimised /copy and /paste to be much more memory efficient.
|
||||
- Created /tpa and /hug commands.
|
||||
- Implemented CPE CPFull437 extension, allowing usage of all code page 437 characters in chat, commands, and messages.
|
||||
- Begun work on BlockDefinitions.
|
||||
- Updated help for /env to be more visually nice.
|
||||
- DisplayName is used in most places instead of name.
|
||||
- Fixed some cases of hidden players being revealed.
|
||||
- Added /mark command that 'marks' the current position as a coordinate for selections/cuboids etc.
|
||||
- Added /os block, unblock, kickall, kick, and blacklist.
|
||||
- /ranks show ranks logs for a player.
|
||||
- Added /promote and /demote which also show rank reasons.
|
||||
- Prevent hidden players interacting with killer blocks.
|
||||
- Added an 'empty' map generation type.
|
||||
- Prevent slapping of hidden players.
|
||||
- Fix /freeze not working with console.
|
||||
- Added /xmodel.
|
||||
v1.7.3.0
|
||||
- Show env properties in /mapinfo.
|
||||
- Add more os commands: weather, env, texture, motd, pervisit, allowguns
|
||||
- Cannot set pervisit to higher than own rank.
|
||||
- Reintroduced emotes.
|
||||
- Fixed model not changing your own player model until reload.
|
||||
- Removed Global Chat banlist update.
|
||||
- Removed ability to change global change nick.
|
||||
- No message causes current level to be used for /unload.
|
||||
- Show level texture in /mapinfo, fix level.properties not saving.
|
||||
- Created a new /help menu layout.
|
||||
- Fixed /scinema error.
|
||||
- Created /xnick, /xtitle, /xtcolor, /xcolor.
|
||||
- Made warnings visible in IRC/GUI.
|
||||
- Temp fix for MCGalaxy-protection-levl.
|
||||
- Use /tcolor (or normal color if no title color) for both brakcers in player title.
|
||||
- Adminchat should be turned on when using /xhide.
|
||||
- Hidden players should not be announced as AFK.
|
||||
- prevent /hackrank being used to spam.
|
||||
v1.7.0.0
|
||||
- Add an api for localhost.
|
||||
- Made /reloadcontrollers, not exposed though.
|
||||
- Fix commands not working on console.
|
||||
- Allow saving own map with /os map save.
|
||||
- Fixed /env save issue.
|
||||
|
||||
v1.6.0.0
|
||||
- Added /quit.
|
||||
- Added /env.
|
||||
v1.5.1.2
|
||||
- Fix IRC commands and colors.
|
||||
v1.5.0.7
|
||||
- IRC color codes supported.
|
||||
- /whonick added.
|
||||
- Implemented EnvMapAppearance.
|
||||
v1.0.3.1
|
||||
- Fixed aliases (hopefully)
|
||||
v1.0.0.2
|
||||
|
@ -30,10 +30,23 @@ namespace MCGalaxy.Commands {
|
||||
public override void Use(Player p, string message) {
|
||||
if (message == "") { Help(p); return; }
|
||||
string[] args = message.Split(' ');
|
||||
if (args.Length != 2) { Help(p); return; }
|
||||
string scope = args[0].ToLower();
|
||||
string url = args[1];
|
||||
|
||||
if (args.Length == 1) {
|
||||
if (scope == "level")
|
||||
Player.SendMessage(p, "Level terrain: " + GetPath(p.level.terrainUrl));
|
||||
else if (scope == "levelzip")
|
||||
Player.SendMessage(p, "Level tex pack: " + GetPath(p.level.texturePackUrl));
|
||||
else if (scope == "global")
|
||||
Player.SendMessage(p, "Global terrain: " + GetPath(Server.defaultTerrainUrl));
|
||||
else if (scope == "globalzip")
|
||||
Player.SendMessage(p, "Global tex pack: " + GetPath(Server.defaultTexturePackUrl));
|
||||
else
|
||||
Help(p);
|
||||
return;
|
||||
}
|
||||
|
||||
string url = args[1];
|
||||
if (url.ToLower() == "normal" || url.ToLower() == "reset") {
|
||||
url = "";
|
||||
} else if (!(url.StartsWith("http://") || url.StartsWith("https://"))) {
|
||||
@ -66,6 +79,10 @@ namespace MCGalaxy.Commands {
|
||||
}
|
||||
}
|
||||
|
||||
static string GetPath(string url) {
|
||||
return url == "" ? "(none)" : url;
|
||||
}
|
||||
|
||||
void UpdateGlobally(Player p, bool zip) {
|
||||
foreach (Player pl in Player.players) {
|
||||
bool hasExt = pl.HasCpeExt(CpeExt.EnvMapAppearance) || pl.HasCpeExt(CpeExt.EnvMapAppearance, 2);
|
||||
|
@ -39,7 +39,7 @@ namespace MCGalaxy
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void Execute(string query);
|
||||
public abstract bool Execute(string query);
|
||||
|
||||
public abstract void Commit();
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2011 MCGalaxy
|
||||
Copyright 2011 MCGalaxy
|
||||
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -64,7 +64,7 @@ namespace MCGalaxy
|
||||
}
|
||||
}
|
||||
|
||||
public override void Execute(string query)
|
||||
public override bool Execute(string query)
|
||||
{
|
||||
try {
|
||||
using (MySqlCommand cmd = new MySqlCommand(query, connection, transaction)) {
|
||||
@ -73,7 +73,9 @@ namespace MCGalaxy
|
||||
} catch (Exception e) {
|
||||
System.IO.File.AppendAllText("MySQL_error.log", DateTime.Now + " " + query + "\r\n");
|
||||
Server.ErrorLog(e);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Commit()
|
||||
|
@ -1,19 +1,19 @@
|
||||
/*
|
||||
Copyright 2011 MCGalaxy
|
||||
Copyright 2011 MCGalaxy
|
||||
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
not use this file except in compliance with the Licenses. You may
|
||||
obtain a copy of the Licenses at
|
||||
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
http://www.opensource.org/licenses/ecl2.php
|
||||
http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the Licenses are distributed on an "AS IS"
|
||||
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
||||
or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.Data.SQLite;
|
||||
@ -64,7 +64,7 @@ namespace MCGalaxy
|
||||
}
|
||||
}
|
||||
|
||||
public override void Execute(string query)
|
||||
public override bool Execute(string query)
|
||||
{
|
||||
try {
|
||||
using (SQLiteCommand cmd = new SQLiteCommand(query, connection, transaction)) {
|
||||
@ -73,8 +73,9 @@ namespace MCGalaxy
|
||||
} catch (Exception e) {
|
||||
System.IO.File.AppendAllText("MySQL_error.log", DateTime.Now + " " + query + "\r\n");
|
||||
Server.ErrorLog(e);
|
||||
throw e; // Ensures that only one error is thrown (though two will be caught.)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Commit()
|
||||
|
@ -356,9 +356,11 @@ namespace MCGalaxy
|
||||
{
|
||||
int deleted = bP.deleted ? 1 : 0;
|
||||
IntToPos(bP.index, out x, out y, out z);
|
||||
transaction.Execute(String.Format(template, bP.name,
|
||||
if (!transaction.Execute(String.Format(template, bP.name,
|
||||
bP.TimePerformed.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
x, y, z, bP.type, deleted));
|
||||
x, y, z, bP.type, deleted))) {
|
||||
|
||||
}
|
||||
}
|
||||
transaction.Commit();
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ namespace MCGalaxy.Util {
|
||||
|
||||
int numFiles = Directory.GetFiles(playerDir).Length;
|
||||
string path = Path.Combine(playerDir, numFiles + NewFormat.Extension);
|
||||
NewFormat.SaveUndoData(p.UndoBuffer, path);
|
||||
NewFormat.SaveUndoData(p.UndoBuffer.ToList(), path);
|
||||
}
|
||||
|
||||
public static void UndoPlayer(Player p, string targetName, long seconds, ref bool FoundUser) {
|
||||
|
@ -80,6 +80,7 @@ namespace MCGalaxy.Util {
|
||||
List<ChunkHeader> list = new List<ChunkHeader>();
|
||||
DateTime now = DateTime.Now;
|
||||
Player.UndoPos Pos;
|
||||
bool isPlayer = p != null && p.group.Permission < LevelPermission.Nobody;
|
||||
|
||||
using (Stream fs = File.OpenRead(path))
|
||||
using (BinaryReader r = new BinaryReader(fs))
|
||||
@ -90,7 +91,7 @@ namespace MCGalaxy.Util {
|
||||
Level lvl;
|
||||
if (!CheckChunk(chunk, now, seconds, p, out lvl))
|
||||
return false;
|
||||
if (lvl == null || lvl != p.level) continue;
|
||||
if (lvl == null || (isPlayer && lvl != p.level)) continue;
|
||||
|
||||
Pos.mapName = chunk.LevelName;
|
||||
fs.Seek(chunk.DataPosition, SeekOrigin.Begin);
|
||||
@ -113,7 +114,7 @@ namespace MCGalaxy.Util {
|
||||
Pos.newtype = oldType; Pos.newExtType = oldExtType;
|
||||
Pos.extType = newExtType; Pos.timePlaced = now;
|
||||
lvl.Blockchange(Pos.x, Pos.y, Pos.z, Pos.newtype, true, "", Pos.newExtType);
|
||||
if (p != null)
|
||||
if (isPlayer)
|
||||
p.RedoBuffer.Add(Pos);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user