Class ModerationEntry
- Namespace
- Uncreated.Warfare.Moderation
- Assembly
- Uncreated.Warfare.dll
Base class for a moderation record for a player. All punishments and commendations derive from this.
[JsonConverter(typeof(ModerationEntryConverter))]
public abstract class ModerationEntry : IModerationEntry
- Inheritance
-
ModerationEntry
- Implements
- Derived
- Inherited Members
Fields
MaxEntry
public static readonly ModerationEntryType MaxEntry
Field Value
Properties
Actors
Other related players, including admins.
[JsonPropertyName("actors")]
public RelatedActor[] Actors { get; set; }
Property Value
DiscordMessageId
Message ID of the offense or report message, if applicable, otherwise 0.
[JsonPropertyName("discord_message_id")]
public ulong DiscordMessageId { get; set; }
Property Value
Evidence
URL's to video/photo evidence.
[JsonPropertyName("evidence")]
public Evidence[] Evidence { get; set; }
Property Value
- Evidence[]
Id
Unique ID to all types of entries.
[JsonPropertyName("id")]
public uint Id { get; set; }
Property Value
IsAppealable
[JsonIgnore]
public virtual bool IsAppealable { get; }
Property Value
IsLegacy
If the entry was from before the moderation rewrite.
[JsonPropertyName("is_legacy")]
public bool IsLegacy { get; set; }
Property Value
LegacyId
[JsonPropertyName("legacy_id")]
public uint? LegacyId { get; set; }
Property Value
- uint?
Message
Short message about the player.
[JsonPropertyName("message")]
public string? Message { get; set; }
Property Value
PendingReputation
If this entry's reputation change has been applied.
[JsonPropertyName("pending_reputation")]
public double PendingReputation { get; set; }
Property Value
Player
Steam64 ID for the target player.
[JsonPropertyName("target_steam_64")]
public ulong Player { get; set; }
Property Value
RelatedEntries
Related moderation entries to this one.
[JsonIgnore]
public ModerationEntry?[]? RelatedEntries { get; set; }
Property Value
RelatedEntryKeys
The keys of related moderation entries.
[JsonPropertyName("related_entries")]
public uint[] RelatedEntryKeys { get; set; }
Property Value
- uint[]
RelevantLogsBegin
Start time of ActionLogs relevant to this entry.
[JsonPropertyName("relevant_logs_begin_utc")]
public DateTimeOffset? RelevantLogsBegin { get; set; }
Property Value
RelevantLogsEnd
End time of ActionLogs relevant to this entry.
[JsonPropertyName("relevant_logs_end_utc")]
public DateTimeOffset? RelevantLogsEnd { get; set; }
Property Value
Removed
If the moderation entry was removed.
[JsonPropertyName("is_removed")]
public bool Removed { get; set; }
Property Value
RemovedBy
Who removed the moderation entry.
[JsonPropertyName("removing_actor")]
[JsonConverter(typeof(ActorConverter))]
public IModerationActor? RemovedBy { get; set; }
Property Value
RemovedMessage
Why the moderation entry was removed.
[JsonPropertyName("removed_message")]
public string? RemovedMessage { get; set; }
Property Value
RemovedTimestamp
When the moderation entry was removed.
[JsonPropertyName("removed_timestamp_utc")]
public DateTimeOffset? RemovedTimestamp { get; set; }
Property Value
Reputation
Effect this entry has on the player's reputation. Negative for punishments, positive for commendations.
[JsonPropertyName("reputation")]
public double Reputation { get; set; }
Property Value
ResolvedTimestamp
When the entry was finished, i.e. when a punishment was handed out. null if the entry is still in progress.
[JsonPropertyName("resolved_utc")]
public DateTimeOffset? ResolvedTimestamp { get; set; }
Property Value
StartedTimestamp
When the entry was started, i.e. when an offense was reported.
[JsonPropertyName("started_utc")]
public DateTimeOffset StartedTimestamp { get; set; }
Property Value
Methods
AddExtraInfo(DatabaseInterface, List<string>, IFormatProvider, CancellationToken)
public virtual Task AddExtraInfo(DatabaseInterface db, List<string> workingList, IFormatProvider formatter, CancellationToken token = default)
Parameters
dbDatabaseInterfaceworkingListList<string>formatterIFormatProvidertokenCancellationToken
Returns
GetDisplayMessage()
public virtual string? GetDisplayMessage()
Returns
GetDisplayName()
public virtual string GetDisplayName()
Returns
GetIcon()
public virtual Guid? GetIcon()
Returns
- Guid?
Read(ByteReader)
public static ModerationEntry Read(ByteReader reader)
Parameters
readerByteReader
Returns
ReadIntl(ByteReader, ushort)
protected virtual void ReadIntl(ByteReader reader, ushort version)
Parameters
readerByteReaderversionushort
ReadProperty(ref Utf8JsonReader, string, JsonSerializerOptions)
public virtual bool ReadProperty(ref Utf8JsonReader reader, string propertyName, JsonSerializerOptions options)
Parameters
readerUtf8JsonReaderpropertyNamestringoptionsJsonSerializerOptions
Returns
TryGetActor(string, out RelatedActor)
public bool TryGetActor(string role, out RelatedActor actor)
Parameters
rolestringactorRelatedActor
Returns
TryGetDisplayActor(out RelatedActor)
public virtual bool TryGetDisplayActor(out RelatedActor actor)
Parameters
actorRelatedActor
Returns
TryGetPrimaryAdmin(out RelatedActor)
public bool TryGetPrimaryAdmin(out RelatedActor actor)
Parameters
actorRelatedActor
Returns
Write(ByteWriter, ModerationEntry)
public static void Write(ByteWriter writer, ModerationEntry entry)
Parameters
writerByteWriterentryModerationEntry
Write(Utf8JsonWriter, JsonSerializerOptions)
public virtual void Write(Utf8JsonWriter writer, JsonSerializerOptions options)
Parameters
writerUtf8JsonWriteroptionsJsonSerializerOptions
WriteIntl(ByteWriter)
protected virtual void WriteIntl(ByteWriter writer)
Parameters
writerByteWriter