mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-14 09:45:11 -04:00
Extra permission for seeing state/province in /location
This commit is contained in:
parent
e7140e0408
commit
ca1d16c0fa
@ -26,6 +26,9 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
public override string shortcut { get { return "GeoIP"; } }
|
||||
public override string type { get { return CommandTypes.Moderation; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }
|
||||
public override CommandPerm[] ExtraPerms {
|
||||
get { return new[] { new CommandPerm(LevelPermission.Admin, "can see state/province") }; }
|
||||
}
|
||||
|
||||
class GeoInfo {
|
||||
[ConfigString] public string region;
|
||||
@ -60,9 +63,10 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
if (elems == null) elems = ConfigElement.GetAll(typeof(GeoInfo));
|
||||
obj.Deserialise(elems, info);
|
||||
|
||||
|
||||
string suffix = HasExtraPerm(p, data.Rank, 1) ? "&b{1}%S/&b{2}" : "&b{2}";
|
||||
string target = name == null ? ip : "of " + PlayerInfo.GetColoredName(p, name);
|
||||
p.Message("The IP {0} %Shas been traced to: &b{1}%S/&b{2}",
|
||||
target, info.region, info.country);
|
||||
p.Message("The IP {0} %Straces to: " + suffix, target, info.region, info.country);
|
||||
}
|
||||
|
||||
public override void Help(Player p) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user