mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Latest backup in /mi uses relative time now.
This commit is contained in:
parent
060e48487d
commit
38eb620214
@ -65,9 +65,10 @@ namespace MCGalaxy.Commands {
|
||||
}
|
||||
|
||||
if (Directory.Exists(Server.backupLocation + "/" + data.Name)) {
|
||||
int latestBackup = Directory.GetDirectories(Server.backupLocation + "/" + data.Name).Length;
|
||||
DateTime time = Directory.GetCreationTime(LevelInfo.BackupPath(data.Name, latestBackup.ToString()));
|
||||
Player.Message(p, " Latest backup: &a{0} %Sat &a" + time.ToString("yyyy-MM-dd HH:mm:ss"), latestBackup);
|
||||
int latest = Directory.GetDirectories(Server.backupLocation + "/" + data.Name).Length;
|
||||
DateTime time = File.GetCreationTimeUtc(LevelInfo.BackupPath(data.Name, latest.ToString()));
|
||||
TimeSpan delta = DateTime.UtcNow - time;
|
||||
Player.Message(p, " Latest backup: &a{0} %S({1} ago)", latest, delta.Shorten());
|
||||
} else {
|
||||
Player.Message(p, " No backups for this map exist yet.");
|
||||
}
|
||||
|
@ -86,8 +86,9 @@ namespace MCGalaxy {
|
||||
if (p.Rank > Max && !p.group.CanExecute(maxCmd)) {
|
||||
Group grp = Group.findPerm(Max);
|
||||
string grpName = grp == null ? "&f" + Max : grp.ColoredName;
|
||||
Player.Message(p, "Only {2} and below may {1} in {0}.", name, action, grpName) return false;
|
||||
}
|
||||
Player.Message(p, "Only {2} and below may {1} in {0}.", name, action, grpName); return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user