Administration - Warnings¶
This page documents hooks in the administration - warnings category.
AddWarning(charID, warned, warnedSteamID, timestamp, message, warner, warnerSteamID, severity)View Source
Purpose
Stores a new warning entry for a character and returns the resolved severity level.
Category
Administration - Warnings
Realm
Server
Parameters
number|string charID The character ID receiving the warning.
string warned The warned player's display name at the time of issue.
string warnedSteamID The warned player's SteamID.
string timestamp The timestamp recorded for the warning.
string message The warning reason text.
string warner The display name of the admin or system issuing the warning.
string warnerSteamID The SteamID of the warning issuer.
string severity The requested severity level, or `nil` to default to Medium.
Returns
string The severity value stored for the warning.
GetWarnings(charID)View Source
Purpose
Retrieves the stored warnings for a character.
Category
Administration - Warnings
Realm
Server
Parameters
number|string charID The character ID whose warning history should be fetched.
Returns
Deferred Resolves with a sequential table of warning rows for the character.
RemoveWarning(charID, index)View Source
Purpose
Removes a stored warning from a character by its list index.
Category
Administration - Warnings
Realm
Server
Parameters
number|string charID The character ID whose warning should be removed.
number index The one-based warning index to remove from the fetched warning list.
Returns
Deferred Resolves with the removed warning row, or `nil` when the index is invalid.
WarningIssued(client, target, reason, severity, count, warnerSteamID, warnedSteamID)View Source
Purpose
Called after a warning is issued so other systems can react or log the event.
Category
Administration - Warnings
Realm
Server
Parameters
Player client The admin or staff member who issued the warning.
Player target The player who received the warning.
string reason The warning reason text.
string severity The stored warning severity.
number count The warned player's total warning count after the new warning is added.
string warnerSteamID The SteamID of the warning issuer.
string warnedSteamID The SteamID of the warned player.