mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-03 10:33:29 -04:00
Don't allow custom /pay messages while muted
This commit is contained in:
parent
3b78863c79
commit
5386ad74b4
@ -29,6 +29,12 @@ namespace MCGalaxy.Commands.Eco {
|
||||
bool all = false;
|
||||
if (!ParseArgs(p, message, ref all, "pay", out trans)) return;
|
||||
|
||||
// Player can use /pay messages to bypass a mute
|
||||
if (trans.Reason != null && !p.CanSpeak()) {
|
||||
p.Message("%WCannot specify a payment reason, as you cannot currently speak");
|
||||
return;
|
||||
}
|
||||
|
||||
int matches = 1;
|
||||
Player who = PlayerInfo.FindMatches(p, trans.TargetName, out matches);
|
||||
if (matches > 1) return;
|
||||
|
@ -313,7 +313,9 @@ namespace MCGalaxy {
|
||||
#endregion
|
||||
|
||||
/// <summary> Returns whether the player is currently allowed to talk. </summary>
|
||||
public bool CanSpeak() { return !muted && (voice || !Server.chatmod); }
|
||||
public bool CanSpeak() {
|
||||
return IsConsole || (!muted && (voice || !Server.chatmod));
|
||||
}
|
||||
|
||||
/// <summary> Blocks calling thread until all 'new map loaded' packets have been sent. </summary>
|
||||
public void BlockUntilLoad(int sleep) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user