mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
core: prevent bypassing /ignore
This commit is contained in:
parent
b201d0d062
commit
91962a08c9
@ -30,7 +30,9 @@ namespace MCGalaxy.Commands {
|
|||||||
|
|
||||||
string giver = (p == null) ? "(console)" : p.ColoredName;
|
string giver = (p == null) ? "(console)" : p.ColoredName;
|
||||||
if (!TryMessage(p, string.Format(message, giver, who.ColoredName))) return false;
|
if (!TryMessage(p, string.Format(message, giver, who.ColoredName))) return false;
|
||||||
if (messageWho && !who.listignored.Contains(giver))
|
|
||||||
|
string giverRaw = (p == null) ? "(console)" : p.name;
|
||||||
|
if (messageWho && !who.listignored.Contains(giverRaw))
|
||||||
Player.Message(who, string.Format(message, giver, "you"));
|
Player.Message(who, string.Format(message, giver, "you"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ namespace MCGalaxy.Commands {
|
|||||||
if (cantSend) {
|
if (cantSend) {
|
||||||
Player.Message(p, "You are now marked as being AFK.");
|
Player.Message(p, "You are now marked as being AFK.");
|
||||||
} else {
|
} else {
|
||||||
Chat.MessageWhere("-{0}%S- is AFK {1}", pl => Entities.CanSee(pl, p),
|
Chat.MessageWhere("-{0}%S- is AFK {1}",
|
||||||
|
pl => Entities.CanSee(pl, p) && !pl.listignored.Contains(p.name),
|
||||||
p.ColoredName, message);
|
p.ColoredName, message);
|
||||||
Player.RaisePlayerAction(p, PlayerAction.AFK, message);
|
Player.RaisePlayerAction(p, PlayerAction.AFK, message);
|
||||||
p.CheckForMessageSpam();
|
p.CheckForMessageSpam();
|
||||||
@ -63,7 +64,8 @@ namespace MCGalaxy.Commands {
|
|||||||
if (cantSend) {
|
if (cantSend) {
|
||||||
Player.Message(p, "You are no longer marked as being AFK.");
|
Player.Message(p, "You are no longer marked as being AFK.");
|
||||||
} else {
|
} else {
|
||||||
Chat.MessageWhere("-{0}%S- is no longer AFK", pl => Entities.CanSee(pl, p),
|
Chat.MessageWhere("-{0}%S- is no longer AFK",
|
||||||
|
pl => Entities.CanSee(pl, p) && !pl.listignored.Contains(p.name),
|
||||||
p.ColoredName);
|
p.ColoredName);
|
||||||
Player.RaisePlayerAction(p, PlayerAction.UnAFK, message);
|
Player.RaisePlayerAction(p, PlayerAction.UnAFK, message);
|
||||||
p.CheckForMessageSpam();
|
p.CheckForMessageSpam();
|
||||||
|
@ -42,7 +42,7 @@ namespace MCGalaxy.Commands {
|
|||||||
Level[] loaded = LevelInfo.Loaded.Items;
|
Level[] loaded = LevelInfo.Loaded.Items;
|
||||||
|
|
||||||
foreach (string file in files) {
|
foreach (string file in files) {
|
||||||
string map = Path.GetFileNameWithoutExtension(file);
|
string map = Path.GetFileNameWithoutExtension(file);
|
||||||
if (IsLoaded(loaded, map)) continue;
|
if (IsLoaded(loaded, map)) continue;
|
||||||
maps.Add(map);
|
maps.Add(map);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user