mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Non-public mod action logs should still be relayed to non-public channels on external relays
This commit is contained in:
parent
a3dd5b5166
commit
80884967e2
@ -54,7 +54,8 @@ namespace MCGalaxy.Core {
|
||||
Chat.Message(ChatScope.Global, e.FormatMessage(targetNick, action),
|
||||
null, null, true);
|
||||
} else {
|
||||
Chat.MessageOps("To Ops: " + e.FormatMessage(targetNick, action));
|
||||
Chat.Message(ChatScope.Perms, "To Ops: " + e.FormatMessage(targetNick, action),
|
||||
Chat.OpchatPerms, null, true);
|
||||
}
|
||||
|
||||
action = Colors.StripUsed(action);
|
||||
|
@ -18,13 +18,16 @@
|
||||
using MCGalaxy.Commands.Moderation;
|
||||
using MCGalaxy.Events;
|
||||
|
||||
namespace MCGalaxy.Modules.Moderation.Notes {
|
||||
public class CmdNote : Command2 {
|
||||
namespace MCGalaxy.Modules.Moderation.Notes
|
||||
{
|
||||
public class CmdNote : Command2
|
||||
{
|
||||
public override string name { get { return "Note"; } }
|
||||
public override string type { get { return CommandTypes.Moderation; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
|
||||
protected virtual bool announce { get { return true; } }
|
||||
protected virtual ModActionType modActionType { get { return ModActionType.Noted; } }
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
if (!Server.Config.LogNotes) {
|
||||
p.Message("Notes logging must be enabled to note players."); return;
|
||||
@ -54,12 +57,14 @@ namespace MCGalaxy.Modules.Moderation.Notes {
|
||||
p.Message("&HFor [text], @number can be used as a shortcut for that rule.");
|
||||
}
|
||||
}
|
||||
public class CmdOpNote : CmdNote {
|
||||
|
||||
public class CmdOpNote : CmdNote
|
||||
{
|
||||
public override string name { get { return "OpNote"; } }
|
||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||
|
||||
protected override bool announce { get { return false; } }
|
||||
protected override ModActionType modActionType { get { return ModActionType.OpNoted; } }
|
||||
|
||||
public override void Help(Player p) {
|
||||
p.Message("&T/OpNote [player] [text]");
|
||||
p.Message("&HAdds a note to [player]'s /notes that only ops may see.");
|
||||
|
@ -62,6 +62,15 @@ namespace MCGalaxy.Modules.Moderation.Notes
|
||||
/// </summary>
|
||||
public class NoteAcronym
|
||||
{
|
||||
public readonly string Acronym;
|
||||
public readonly string Action;
|
||||
|
||||
private NoteAcronym(string acronym, string action) {
|
||||
Acronym = acronym;
|
||||
Action = action;
|
||||
}
|
||||
|
||||
|
||||
private readonly static NoteAcronym Warned = new NoteAcronym("W", "Warned");
|
||||
private readonly static NoteAcronym Kicked = new NoteAcronym("K", "Kicked");
|
||||
private readonly static NoteAcronym Muted = new NoteAcronym("M", "Muted");
|
||||
@ -101,13 +110,5 @@ namespace MCGalaxy.Modules.Moderation.Notes
|
||||
}
|
||||
return acronym;
|
||||
}
|
||||
|
||||
public readonly string Acronym;
|
||||
public readonly string Action;
|
||||
|
||||
private NoteAcronym(string acronym, string action) {
|
||||
Acronym = acronym;
|
||||
Action = action;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user