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),
|
Chat.Message(ChatScope.Global, e.FormatMessage(targetNick, action),
|
||||||
null, null, true);
|
null, null, true);
|
||||||
} else {
|
} 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);
|
action = Colors.StripUsed(action);
|
||||||
|
@ -18,13 +18,16 @@
|
|||||||
using MCGalaxy.Commands.Moderation;
|
using MCGalaxy.Commands.Moderation;
|
||||||
using MCGalaxy.Events;
|
using MCGalaxy.Events;
|
||||||
|
|
||||||
namespace MCGalaxy.Modules.Moderation.Notes {
|
namespace MCGalaxy.Modules.Moderation.Notes
|
||||||
public class CmdNote : Command2 {
|
{
|
||||||
|
public class CmdNote : Command2
|
||||||
|
{
|
||||||
public override string name { get { return "Note"; } }
|
public override string name { get { return "Note"; } }
|
||||||
public override string type { get { return CommandTypes.Moderation; } }
|
public override string type { get { return CommandTypes.Moderation; } }
|
||||||
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
|
public override LevelPermission defaultRank { get { return LevelPermission.AdvBuilder; } }
|
||||||
protected virtual bool announce { get { return true; } }
|
protected virtual bool announce { get { return true; } }
|
||||||
protected virtual ModActionType modActionType { get { return ModActionType.Noted; } }
|
protected virtual ModActionType modActionType { get { return ModActionType.Noted; } }
|
||||||
|
|
||||||
public override void Use(Player p, string message, CommandData data) {
|
public override void Use(Player p, string message, CommandData data) {
|
||||||
if (!Server.Config.LogNotes) {
|
if (!Server.Config.LogNotes) {
|
||||||
p.Message("Notes logging must be enabled to note players."); return;
|
p.Message("Notes logging must be enabled to note players."); return;
|
||||||
@ -44,7 +47,7 @@ namespace MCGalaxy.Modules.Moderation.Notes {
|
|||||||
if (group == null) return;
|
if (group == null) return;
|
||||||
|
|
||||||
ModAction action = new ModAction(target, p, modActionType, note);
|
ModAction action = new ModAction(target, p, modActionType, note);
|
||||||
action.Announce = announce;
|
action.Announce = announce;
|
||||||
OnModActionEvent.Call(action);
|
OnModActionEvent.Call(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,12 +57,14 @@ namespace MCGalaxy.Modules.Moderation.Notes {
|
|||||||
p.Message("&HFor [text], @number can be used as a shortcut for that rule.");
|
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 string name { get { return "OpNote"; } }
|
||||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||||
|
|
||||||
protected override bool announce { get { return false; } }
|
protected override bool announce { get { return false; } }
|
||||||
protected override ModActionType modActionType { get { return ModActionType.OpNoted; } }
|
protected override ModActionType modActionType { get { return ModActionType.OpNoted; } }
|
||||||
|
|
||||||
public override void Help(Player p) {
|
public override void Help(Player p) {
|
||||||
p.Message("&T/OpNote [player] [text]");
|
p.Message("&T/OpNote [player] [text]");
|
||||||
p.Message("&HAdds a note to [player]'s /notes that only ops may see.");
|
p.Message("&HAdds a note to [player]'s /notes that only ops may see.");
|
||||||
|
@ -62,6 +62,15 @@ namespace MCGalaxy.Modules.Moderation.Notes
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class NoteAcronym
|
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 Warned = new NoteAcronym("W", "Warned");
|
||||||
private readonly static NoteAcronym Kicked = new NoteAcronym("K", "Kicked");
|
private readonly static NoteAcronym Kicked = new NoteAcronym("K", "Kicked");
|
||||||
private readonly static NoteAcronym Muted = new NoteAcronym("M", "Muted");
|
private readonly static NoteAcronym Muted = new NoteAcronym("M", "Muted");
|
||||||
@ -101,13 +110,5 @@ namespace MCGalaxy.Modules.Moderation.Notes
|
|||||||
}
|
}
|
||||||
return acronym;
|
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