mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 16:07:07 -04:00
Using /review should message all those who have permissions to /review next, not just opchat perms.
This commit is contained in:
parent
e267b31d4f
commit
d494866473
@ -63,10 +63,10 @@ namespace MCGalaxy.Commands
|
|||||||
{
|
{
|
||||||
foreach (Player pl in PlayerInfo.players)
|
foreach (Player pl in PlayerInfo.players)
|
||||||
{
|
{
|
||||||
if (pl.group.Permission >= Server.opchatperm && !pl.hidden)
|
if (pl.group.Permission >= Server.reviewnext && !pl.hidden)
|
||||||
{
|
{
|
||||||
isopson = true;
|
isopson = true;
|
||||||
break; // We're done, break out of this loop
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,9 +82,10 @@ namespace MCGalaxy.Commands
|
|||||||
if (reviewlistpos == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. There is &c1 " + Server.DefaultColor + "person in front of you in the queue"); }
|
if (reviewlistpos == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. There is &c1 " + Server.DefaultColor + "person in front of you in the queue"); }
|
||||||
if ((reviewlistpos + 1) == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. You are &cfirst " + Server.DefaultColor + "in line!"); }
|
if ((reviewlistpos + 1) == 1) { Player.SendMessage(p, "You entered the &creview " + Server.DefaultColor + "queue. You are &cfirst " + Server.DefaultColor + "in line!"); }
|
||||||
Player.SendMessage(p, "The Online Operators have been notified. Someone should be with you shortly.");
|
Player.SendMessage(p, "The Online Operators have been notified. Someone should be with you shortly.");
|
||||||
Chat.GlobalMessageOps(p.color + " - " + p.name + " - " + Server.DefaultColor + "entered the review queue");
|
|
||||||
if ((reviewlistpos + 1) > 1) { Chat.GlobalMessageOps("There are now &c" + (reviewlistpos + 1) + Server.DefaultColor + " people waiting for &creview!"); }
|
string start = (reviewlistpos + 1) > 1 ? "There are now &c" + (reviewlistpos + 1) + " %Speople" : "There is now &c1 %Sperson";
|
||||||
else { Chat.GlobalMessageOps("There is now &c1 " + Server.DefaultColor + "person waiting for &creview!"); }
|
Chat.GlobalMessageMinPerms(p.color + p.name + " %Sentered the review queue", Server.reviewnext);
|
||||||
|
Chat.GlobalMessageMinPerms(start + " waiting for a &creview!", Server.reviewnext);
|
||||||
p.ReviewTimer();
|
p.ReviewTimer();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -70,34 +70,34 @@ namespace MCGalaxy {
|
|||||||
message = "<World>" + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message;
|
message = "<World>" + from.color + from.voicestring + from.color + from.prefix + from.name + ": &f" + message;
|
||||||
}
|
}
|
||||||
PlayerInfo.players.ForEach(
|
PlayerInfo.players.ForEach(
|
||||||
delegate(Player p) {
|
p => {
|
||||||
if ( p.level.worldChat && p.Chatroom == null )
|
if (p.level.worldChat && p.Chatroom == null)
|
||||||
SendGlobalMessage(p, from, message);
|
SendGlobalMessage(p, from, message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GlobalMessageLevel(Level l, string message) {
|
public static void GlobalMessageLevel(Level l, string message) {
|
||||||
PlayerInfo.players.ForEach(
|
PlayerInfo.players.ForEach(
|
||||||
delegate(Player p) {
|
p => {
|
||||||
if ( p.level == l && p.Chatroom == null )
|
if (p.level == l && p.Chatroom == null)
|
||||||
|
Player.SendMessage(p, message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void GlobalMessageMinPerms(string message, LevelPermission minPerm) {
|
||||||
|
PlayerInfo.players.ForEach(
|
||||||
|
p => {
|
||||||
|
if (p.group.Permission >= minPerm)
|
||||||
Player.SendMessage(p, message);
|
Player.SendMessage(p, message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GlobalMessageOps(string message) {
|
public static void GlobalMessageOps(string message) {
|
||||||
PlayerInfo.players.ForEach(
|
GlobalMessageMinPerms(message, Server.opchatperm);
|
||||||
delegate(Player p) {
|
|
||||||
if (p.group.Permission >= Server.opchatperm)
|
|
||||||
Player.SendMessage(p, message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GlobalMessageAdmins(string message) {
|
public static void GlobalMessageAdmins(string message) {
|
||||||
PlayerInfo.players.ForEach(
|
GlobalMessageMinPerms(message, Server.adminchatperm);
|
||||||
delegate(Player p) {
|
|
||||||
if (p.group.Permission >= Server.adminchatperm)
|
|
||||||
Player.SendMessage(p, message);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void SendGlobalMessage(Player p, Player from, string message) {
|
static void SendGlobalMessage(Player p, Player from, string message) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user